Basic Image AlgorithmS Library
2.8.0
|
data object which holds all infomations of a B-Spline curve (ContourBSpline); its shared by B-Spline curves with same basis. More...
#include <FeatureDetector/ContourBSplineData.hh>
Public Member Functions | |
void | AddDebugLevel (const long int lv) |
void | AddDebugLevel (const std::string &name) |
void | ComputeAreaCoefficientMatrix_ () |
computes the area coefficient matrix of the B-Spline curve More... | |
BIAS::Polynom | ComputeBasePolynomRecursive_ (const unsigned int span, const unsigned int knotIndex, const unsigned int order, const std::vector< int > &breakpoints) |
recursivly computes one base polynom for a span matrix More... | |
void | ComputeSpan_ (const unsigned int span, const int placeOff, const std::vector< unsigned int > &kMult, const std::vector< int > &k) |
computes the span matrix of a B-Spline curves span More... | |
void | ComputeSplineMetricMatrix_ () |
computes the metric matrix (scriptB) of the B-Spline curve More... | |
void | ComputeSplineMetricMatrixParametric_ () |
computes the metrix matrix (I^2 x scriptB) of the B-Spline curve More... | |
ContourBSplineData () | |
empty standard constructor More... | |
bool | DebugLevelIsSet (const long int lv) const |
bool | DebugLevelIsSet (const std::string &name) const |
int | GetDebugLevel () const |
std::ostream & | GetDebugStream () const |
void | GetDebugStream (std::ostream &os) const |
long int | Name2DebugLevel (const std::string &name) const |
looks up a debuglevel in the internal map, returns 0 if not found More... | |
long int | NewDebugLevel (const std::string &name) |
creates a new debuglevel More... | |
void | PrintDebugLevel (std::ostream &os=std::cout) const |
void | RegisterAperiodicBSpline_ () |
inits class variables for an open B-Spline curve More... | |
void | RegisterPeriodicBSpline_ () |
inits class variables for a closed B-Spline curve More... | |
void | RemoveDebugLevel (const long int lv) |
void | RemoveDebugLevel (const std::string &name) |
void | SetDebugLevel (const long int lv) |
void | SetDebugLevel (const std::string &name) |
void | SetDebugStream (const std::ostream &os) |
void | ShowDebugLevel (std::ostream &os=std::cout) const |
prints all internally known debuglevels More... | |
void | Unregister () |
decrements reference counter to this data object and deletes it if there is no reference to it More... | |
~ContourBSplineData () | |
destructor More... | |
Static Public Member Functions | |
static long int | GetGlobalDebugLevel () |
static ContourBSplineData * | LookUpData_ (const unsigned int order, const ContourBSplineType::Type bType, const std::vector< unsigned int > &mPnts) |
looks up if a ContourBSplineData object with the initial given parameter exist and returns pointer to it or NULL More... | |
static ContourBSplineData * | Register (const unsigned int order, const ContourBSplineType::Type bType, const std::vector< unsigned int > &mPnts) |
registers a ContourBSpline object and returns pointer to its data object More... | |
static ContourBSplineData * | Register (const std::vector< ContourBSplineData * > &bSplinesData) |
registers a clustered ContourBSpline object and returns pointer to its data object More... | |
static ContourBSplineData * | Register (const unsigned int order, const ContourBSplineType::Type bType, const std::vector< unsigned int > &mPnts, const unsigned int numBasePolynoms, const unsigned int numSpans, const std::vector< unsigned int > &numSpansVec, const std::vector< BIAS::Matrix< double > > &placedSpanMatrices) |
registers a clustered ContourBSpline object and returns pointer to its data object More... | |
static void | SetGlobalDebugLevel (long int lev) |
Public Attributes | |
BIAS::Matrix< double > | areaCoefficientMatrix_ |
area coefficient matrix - confer to "Active Contours", chapter 3, p.65 More... | |
ContourBSplineType::Type | bType_ |
type of B-Spline curve (Open,Closed,Cluster) More... | |
std::vector< unsigned int > | mPnts_ |
vector of multiplicities - determines in which control points edges are modelled More... | |
unsigned int | numBasePolynoms_ |
number of base polynoms of curve - equal to number of control points More... | |
unsigned int | numSpans_ |
number of spans of curve More... | |
std::vector< unsigned int > | numSpansVec_ |
number of spans for sub B-Spline curves of the B-Spline curve length >1 when curve is clustered More... | |
unsigned int | order_ |
order of B-Spline curve More... | |
std::vector< BIAS::Matrix < double > > | placedSpanMatrices_ |
span matrices of curve (multiplied with placement matrices - p.292) More... | |
unsigned int | reference_ |
reference counter - for handling unregister More... | |
BIAS::Matrix< double > | splineMetricMatrix_ |
metric matrix - confer to "Active Contours", chapter 3, p.50f More... | |
BIAS::Matrix< double > | splineMetricMatrixParametric_ |
metric matrix - confer to "Active Contours", chapter 3, p.59 More... | |
Static Public Attributes | |
static std::list < ContourBSplineData * > | pntr_ |
list of all pointers to ContourBSplineData objects More... | |
Protected Member Functions | |
long | ConsumeNextFreeDebuglevel_ () |
returns the next available debuglevel More... | |
Protected Attributes | |
long int | _liDebugLevel |
long int | _liNextDebugLevel |
new concept, debuglevel are managed here in the debug class More... | |
std::map< std::string, long int > | _String2Debuglevel |
Static Protected Attributes | |
static std::ostream | _zDebugStream |
static long int | GlobalDebugLevel = 0 |
Friends | |
class | ContourBSpline |
class | ContourBSplineShapeMatrix |
data object which holds all infomations of a B-Spline curve (ContourBSpline); its shared by B-Spline curves with same basis.
Objects of this class save informations of a B-Spline curve (ContourBSpline). If two or more ContourBSpline objects are initialised with the same order, type and multiplicity vector, then they share the same ContourBSplineData object. (Attention: shape-space and regularisation matrices are handled by class ContourBSplineShapeMatrix.)
A ContourBSplineData object is created/registered transparently by a call of a ContourBSpline objects Init(...) or Load(...) function. These functions call Register(...) of this class. The Register(...) function looks if it allready has the right data object. If yes, it registers the ContourBSpline object by incrementing the reference counter of the data object and returns the pointer to the data object. If not, it uses the input parameter to create a new data object. Details of creation process are documented in book "Active Contours", mainly in appendix A.
If a ContourBSpline objects gets destroyed it calls the Unregister function of ContourBSplineData object. The reference counter gets decremented and the data object destroyed if the reference counter is zero.
Definition at line 73 of file ContourBSplineData.hh.
|
inline |
empty standard constructor
Definition at line 78 of file ContourBSplineData.hh.
|
inline |
|
inlineinherited |
Definition at line 355 of file Debug.hh.
Referenced by BIAS::GLProjectionParametersBase::AddDebugLevel(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), BIAS::ShowCamWxVideoSourceFactory::OpenDevice(), and BIAS::SceneOpenSceneGraph::SceneOpenSceneGraph().
|
inlineinherited |
void ContourBSplineData::ComputeAreaCoefficientMatrix_ | ( | ) |
computes the area coefficient matrix of the B-Spline curve
Confer to "Active Contours" chapter 3, p.65; appendix A, p.293 for details.
Definition at line 504 of file ContourBSplineData.cpp.
References BIAS::Matrix< T >::MultiplyIP(), BIAS::Matrix< T >::MultLeft(), and BIAS::Matrix< T >::SetZero().
Referenced by Register().
BIAS::Polynom ContourBSplineData::ComputeBasePolynomRecursive_ | ( | const unsigned int | span, |
const unsigned int | knotIndex, | ||
const unsigned int | order, | ||
const std::vector< int > & | breakpoints | ||
) |
recursivly computes one base polynom for a span matrix
[in] | span | index of span which includes base polynom |
[in] | knotIndex | index of first knot of base polynom |
[in] | order | order of B-Spline curve |
[in] | breakpoints | vector of knot values |
Confer to "Active Contours" appendix A p.291 for details.
Definition at line 353 of file ContourBSplineData.cpp.
References BIAS::Polynom::SetOrder().
void ContourBSplineData::ComputeSpan_ | ( | const unsigned int | span, |
const int | placeOff, | ||
const std::vector< unsigned int > & | kMult, | ||
const std::vector< int > & | k | ||
) |
computes the span matrix of a B-Spline curves span
[in] | span | index of span whose matrix should be computed |
[in] | placeOff | offset used in periodic case for index of first knot of a span |
[in] | kMult | vector of multiplicities of knots |
[in] | k | vector of knots values (plain) |
Confer to "Active Contours" appendix A p.291 for details.
Definition at line 398 of file ContourBSplineData.cpp.
References BIAS::Matrix< T >::MultLeft(), and BIAS::ContourBSplineType::Open.
void ContourBSplineData::ComputeSplineMetricMatrix_ | ( | ) |
computes the metric matrix (scriptB) of the B-Spline curve
Confer to "Active Contours" chapter 3, p.50f; appendix A, p.293 for details.
Definition at line 448 of file ContourBSplineData.cpp.
References BIAS::Matrix< T >::MultiplyIP(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< T >::newsize(), and BIAS::Matrix< T >::SetIdentity().
Referenced by Register().
void ContourBSplineData::ComputeSplineMetricMatrixParametric_ | ( | ) |
computes the metrix matrix (I^2 x scriptB) of the B-Spline curve
Confer to "Active Contours" chapter 3, p.59; appendix A, p.293 for details.
Definition at line 477 of file ContourBSplineData.cpp.
Referenced by Register().
|
inlineprotectedinherited |
|
inlineinherited |
Definition at line 341 of file Debug.hh.
Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), BIAS::MonteCarloTransform::GetSamples_(), and BIAS::MonteCarloTransform::Transform().
|
inlineinherited |
|
inlineinherited |
Definition at line 332 of file Debug.hh.
Referenced by BIAS::listenthread(), BIAS::Image< StorageType >::operator=(), and BIAS::ImageBase::operator=().
|
inlineinherited |
|
inlineinherited |
|
inlinestaticinherited |
|
static |
looks up if a ContourBSplineData object with the initial given parameter exist and returns pointer to it or NULL
[in] | order | order of B-Spline curve |
[in] | bType | type of B-Spline curve (Open or Closed) |
[in] | mPnts | multiplicity vector of curve (determines in which control points edges are modelled |
Definition at line 178 of file ContourBSplineData.cpp.
|
inlineinherited |
|
inlineinherited |
creates a new debuglevel
Definition at line 474 of file Debug.hh.
Referenced by BIAS::COSAC< SolutionType >::COSAC(), BIAS::ProjectionParametersPerspectiveDepth::Init(), BIAS::MonteCarloTransform::MonteCarloTransform(), BIAS::PMatrixEstimation::PMatrixEstimation(), BIAS::PreemptiveRANSAC< SolutionType >::PreemptiveRANSAC(), BIAS::RANSACPreKnowledge< SolutionType >::RANSACPreKnowledge(), BIAS::ROI::ROI(), BIAS::RotationAveraging::RotationAveraging(), BIAS::SceneOpenSceneGraph::SceneOpenSceneGraph(), BIAS::ThreeDOutOpenSceneGraph::ThreeDOutOpenSceneGraph(), BIAS::Triangulation::Triangulation(), and BIAS::UnscentedTransform::UnscentedTransform().
|
inlineinherited |
|
static |
registers a ContourBSpline object and returns pointer to its data object
[in] | order | order of B-Spline curve |
[in] | bType | type of B-Spline curve (Open or Closed) |
[in] | mPnts | vector of multiplicities (holds information in which control points edges are modelled |
This function is transparently called by the Init(...) function of a ContourBSpline object.
Looks up if there is already a data object that fits to the calling ContourBSpline object. If yes, it returns the pointer to this ContourBSplineData object and inkrements the reference counter of the data object. If not, a new ContourBSplineData object gets created.
Generation includes class variables: order (copy) bType (copy) mPnts (copy) numBasePolynoms (equal to number of control points (length of mPnts)) dependent on type of BSplineCurve (handled by specific helper functions): splineMetricMatrix_ //see "Active Contours" chapter 3 splineMetricMatrixParametric_ areaCoefficientMatrix_ //confer to "Active Contours" chapter 3 //not used for further computation at moment
Definition at line 31 of file ContourBSplineData.cpp.
References bType_, ComputeAreaCoefficientMatrix_(), ComputeSplineMetricMatrix_(), ComputeSplineMetricMatrixParametric_(), mPnts_, numBasePolynoms_, numSpans_, numSpansVec_, BIAS::ContourBSplineType::Open, order_, reference_, RegisterAperiodicBSpline_(), and RegisterPeriodicBSpline_().
Referenced by BIAS::ContourDetectorBSpline< StorageType >::Cluster(), BIAS::ContourDetectorBSpline< StorageType >::Init(), and BIAS::ContourDetectorBSpline< StorageType >::Load().
|
static |
registers a clustered ContourBSpline object and returns pointer to its data object
[in] | bSplinesData | vector of data objects from B-Spline curves which get clustered into one data object |
This function is transparently called by the Cluster(...) function of class ContourBSpline.
Data object is build on basis of given B-Spline curves data objects.
There is no lookup if a data object already exist. When you cluster some B-Spline curves and want a copy of the clustered curve, use operator=.
no lookup here ... cause composition of periodic and aperiodic bsplines possible
type Cluster isnt meaningful at all ... clustered splines can be composition of periodic and aperiodic bsplines
Definition at line 72 of file ContourBSplineData.cpp.
References bType_, BIAS::ContourBSplineType::Cluster, ComputeAreaCoefficientMatrix_(), ComputeSplineMetricMatrix_(), ComputeSplineMetricMatrixParametric_(), mPnts_, numBasePolynoms_, numSpans_, numSpansVec_, order_, placedSpanMatrices_, reference_, and BIAS::Matrix< T >::SetZero().
|
static |
registers a clustered ContourBSpline object and returns pointer to its data object
[in] | order | order of clustered B-Spline curve |
[in] | bType | Type of curve (Cluster) |
[in] | mPnts | multiplicity vector of curve (determines in which control points edges are modelled) |
[in] | numBasePolynoms | number of basepolynomes of the curve (equal to number of control points) |
[in] | numSpans | number of spans of curve |
[in] | numSpansVec | vector seperates numSpans of seperate curves in cluster |
[in] | placedSpanMatrices | vector of all placed span-matrices of curve (see "Active Contours" appendix A) |
This funcion is called transparently by Load(...) function of class ContourBSpline.
There is no lookup if a data object already exist. When you cluster some B-Spline curves and want a copy of the clustered curve, use operator=.
Definition at line 146 of file ContourBSplineData.cpp.
References bType_, ComputeAreaCoefficientMatrix_(), ComputeSplineMetricMatrix_(), ComputeSplineMetricMatrixParametric_(), mPnts_, numBasePolynoms_, numSpans_, numSpansVec_, order_, placedSpanMatrices_, and reference_.
void ContourBSplineData::RegisterAperiodicBSpline_ | ( | ) |
inits class variables for an open B-Spline curve
computes: numSpans_ //number of spans of curve placedSpanMatrices //placed span matrices - see "Active Contours" //appendix A, p.292 splineMetricMatrix_ //see "Active Contours" chapter 3 splineMetricMatrixParametric_ areaCoefficientMatrix_ //confer to "Active Contours" chapter 3 //not used for further computation at moment
Definition at line 303 of file ContourBSplineData.cpp.
Referenced by Register().
void ContourBSplineData::RegisterPeriodicBSpline_ | ( | ) |
inits class variables for a closed B-Spline curve
computes: numSpans_ //number of spans of curve placedSpanMatrices //placed span matrices - see "Active Contours" //appendix A, p.292 splineMetricMatrix_ //see "Active Contours" chapter 3 splineMetricMatrixParametric_ areaCoefficientMatrix_ //confer to "Active Contours" chapter 3 //not used for further computation at moment
Definition at line 194 of file ContourBSplineData.cpp.
Referenced by Register().
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Definition at line 318 of file Debug.hh.
Referenced by BIAS::ShowCamWxVideoSourceFactory::CreateBumbleBee(), BIAS::ShowCamWxVideoSourceFactory::CreateDCAM(), BIAS::VideoSource_MDcam::ScanBus(), BIAS::GLProjectionParametersBase::SetDebugLevel(), BIAS::VideoSource_Disk::VideoSource_Disk(), BIAS::VideoSource_DV2::VideoSource_DV2(), BIAS::VideoSource_DV::VideoSource_DV_Internal_Init_(), and BIAS::VideoSource_V4L::VideoSource_V4L().
|
inlineinherited |
|
inlineinherited |
|
inlinestaticinherited |
|
inlineinherited |
|
inline |
decrements reference counter to this data object and deletes it if there is no reference to it
This function is transparently called by the destructor of a ContourBSpline object.
Definition at line 334 of file ContourBSplineData.hh.
References pntr_, and reference_.
Referenced by ~ContourBSplineData().
|
friend |
Definition at line 74 of file ContourBSplineData.hh.
|
friend |
Definition at line 75 of file ContourBSplineData.hh.
|
protectedinherited |
Definition at line 510 of file Debug.hh.
Referenced by BIAS::Debug::operator=(), and BIAS::ImageBase::operator=().
|
protectedinherited |
new concept, debuglevel are managed here in the debug class
Definition at line 516 of file Debug.hh.
Referenced by BIAS::Debug::operator=().
|
protectedinherited |
Definition at line 517 of file Debug.hh.
Referenced by BIAS::Debug::operator=().
|
staticprotectedinherited |
Definition at line 511 of file Debug.hh.
Referenced by BIAS::Debug::operator=().
BIAS::Matrix<double> BIAS::ContourBSplineData::areaCoefficientMatrix_ |
area coefficient matrix - confer to "Active Contours", chapter 3, p.65
(currently not farther used in fitting process)
Definition at line 331 of file ContourBSplineData.hh.
ContourBSplineType::Type BIAS::ContourBSplineData::bType_ |
type of B-Spline curve (Open,Closed,Cluster)
Definition at line 296 of file ContourBSplineData.hh.
Referenced by Register().
|
staticprotectedinherited |
std::vector<unsigned int> BIAS::ContourBSplineData::mPnts_ |
vector of multiplicities - determines in which control points edges are modelled
Definition at line 302 of file ContourBSplineData.hh.
Referenced by Register().
unsigned int BIAS::ContourBSplineData::numBasePolynoms_ |
number of base polynoms of curve - equal to number of control points
Definition at line 311 of file ContourBSplineData.hh.
Referenced by BIAS::ContourDetectorBSpline< StorageType >::Cluster(), and Register().
unsigned int BIAS::ContourBSplineData::numSpans_ |
number of spans of curve
Definition at line 314 of file ContourBSplineData.hh.
Referenced by Register().
std::vector<unsigned int> BIAS::ContourBSplineData::numSpansVec_ |
number of spans for sub B-Spline curves of the B-Spline curve length >1 when curve is clustered
Definition at line 308 of file ContourBSplineData.hh.
Referenced by Register().
unsigned int BIAS::ContourBSplineData::order_ |
order of B-Spline curve
Definition at line 293 of file ContourBSplineData.hh.
Referenced by Register().
std::vector<BIAS::Matrix<double> > BIAS::ContourBSplineData::placedSpanMatrices_ |
span matrices of curve (multiplied with placement matrices - p.292)
Definition at line 317 of file ContourBSplineData.hh.
Referenced by Register().
|
static |
list of all pointers to ContourBSplineData objects
Definition at line 287 of file ContourBSplineData.hh.
Referenced by Unregister().
unsigned int BIAS::ContourBSplineData::reference_ |
reference counter - for handling unregister
Definition at line 290 of file ContourBSplineData.hh.
Referenced by Register(), and Unregister().
BIAS::Matrix<double> BIAS::ContourBSplineData::splineMetricMatrix_ |
metric matrix - confer to "Active Contours", chapter 3, p.50f
Definition at line 320 of file ContourBSplineData.hh.
BIAS::Matrix<double> BIAS::ContourBSplineData::splineMetricMatrixParametric_ |
metric matrix - confer to "Active Contours", chapter 3, p.59
Definition at line 323 of file ContourBSplineData.hh.
Referenced by BIAS::ContourBSplineShapeMatrix::ComputeRegularisationMatrix().