-
-
Notifications
You must be signed in to change notification settings - Fork 119
Contours and discrete geometrics estimators
Note: CSequence
is called now CRange
-
template <typename KSpace> class 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 closedGridCurve
. This object provides several ranges, each of them are models ofCRange
:-
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 ofCConstIteratorOnPoint<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 ofCConstIteratorOnCode
It returns the successive chaincodes (unsigned int
in 0-3) of the linels of the grid curve -
LinelsRange
: the ConstIterator is a model ofCConstIteratorOnLinel<KSpace>
It returns the successive linels (KSpace::SCell
) of the grid curve. -
ArrowsRange
: the ConstIterator is a model ofCConstIteratorOnArrow<KSpace::Space>
It returns the successive arrows corresponding to linels as astd::pair<KSpace::Space::Point,KSpace::Space::Vector>
where the point describes the coordinates of the pointel and the vector stands for the displacement. -
ConstraintsRange
: the ConstIterator is a model ofCConstIteratorOnConstraints<KSpace::Space>
It returns the center of the two pixels incident to the successive linels as astd::pair<KSpace::Space::Point,KSpace::Space::Point>
-
-
The concept
CLocalCurveGeometricEstimator
describes an object that can process aCRange
so as to returnQuantity
s. More precisely, it provides:- inner types:
Range
the type of the range,Quantity
the type of the estimated quantity. Note thatRange
should provide an inner typeConstIterator
. -
void init( double h, const Range & s, bool closed )
: called once,h
is the grid step,s
describes the piece to process,closed
tells what to do when arriving ats.end()
. -
template <typename OutputIterator> void eval( Range::ConstIterator itb, Range::ConstIterator ite, OutputIterator itw ) const
: writes estimated quantities from positionsitb
tillite
excluded on the output with*itw++
. -
Quantity eval( Sequence::ConstIterator it) const
: returns the estimated quantity at positionit
.
- inner types:
-
We think to provide a rather generic class for building geometric estimators from models of
SegmentComputer
. For instance, given a SegmentComputer and a functor on SegmentComputer, we may provide an estimator which returns the functor value of the most centered segment. The class should be written astemplate <typename SegmentComputer, typename SegmentComputerFunctor> class MostCenteredMaximalSegmentEstimator
, where-
SegmentComputer
is a standard model ofCSegmentComputer
-
SegmentComputerFunctor
has- inner type
Value
. Value operator()( const SegmentComputer & sc )
- inner type
- inner types:
Range
,Quantity
(isSegmentComputerFunctor::Value
) void init( double h, const Range & s, bool closed )
template <typename OutputIterator> void eval( Range::ConstIterator itb, Range::ConstIterator ite, OutputIterator itw ) const
Quantity eval( Range::ConstIterator it) const
-
-
Similarly, we could provide a lambda-Maximal Segment estimator built similarly from maximal segments.
-
The concept
CGlobalCurveGeometricEstimator
describes an object that can process aCRange
so as to return a singleQuantity
. More precisely:- inner types:
Range
the type of the sequence or range,Quantity
the type of the estimated quantity. Note thatRange
should provide an inner typeConstIterator
. -
void init( double h, const Range & s, bool closed )
: called once,h
is the grid step,s
describes the range to process,closed
tells what to do when arriving ats.end()
. -
Quantity eval( ) const
: returns the estimated quantity for the range. - Examples of model: length by MLP,FP, greedy DSSs segmentation.
- inner types:
-
The concept
CGlobalGeometricEstimator
describes an object that can process aCDigitalSet
or aCObject
(don't know if there exist topology dependent global geometric estimators) so as to return a singleQuantity
. More precisely:- inner types:
Set
orObject
the type of the object,Quantity
the type of the estimated quantity. Note thatObject
should provide an inner typeConstIterator
. -
void init( double h, const Set & s)
: called once,h
is the grid step,s
describes the set to process. -
Quantity eval( ) const
: returns the estimated quantity for the object- Examples of model: geometrical moments, circularity, ...
- inner types: