Basic Image AlgorithmS Library
2.8.0
|
represents a special B-Spline and holds functions to handle fitting More...
#include <FeatureDetector/ContourDetectorBSpline.hh>
Public Member Functions | |
void | CenterOverControlPoints () |
centers the curve by computing center over control points (not accurate!) More... | |
void | ComputeRegularisationMatrix () |
computes the regularisation matrix needed for fitting algorithm. More... | |
ContourDetectorBSpline () | |
standard constructor More... | |
ContourDetectorBSpline (const ContourDetectorBSpline< StorageType > &toCopy) | |
copy constructor More... | |
int | Detect (Image< StorageType > &image, std::vector< BIAS::BIASContour > &contour) |
detect function, unfinished More... | |
void | Displace (const double &x, const double &y) |
displace all control points More... | |
void | DrawControlPoints (BIAS::Image< StorageType > &img, const StorageType color[3]) |
draws the control points of the B-Spline curve into image More... | |
void | DrawCurve (BIAS::Image< StorageType > &img, const StorageType color[3]) |
draws B-Spline curve into image More... | |
void | DrawCurve (BIAS::Image< float > &img) |
draws B-Spline curve into image More... | |
void | DrawNormals (const unsigned int normalWidth, BIAS::Image< StorageType > &img, const StorageType color[3]) |
draws B-Spline normals into image More... | |
void | Fit (BIAS::Image< StorageType > &greyImg, const double &alpha, const unsigned int normalWidth) |
fits B-Spline curve to gradient features found in the image More... | |
void | Fit (BIAS::Image< StorageType > &greyImg, const double &alpha, const unsigned int normalWidth, const double &minClip) |
fits B-Spline curve to gradient features found in the image More... | |
void | Fit (const BIAS::Image< float > &featImg, const double &alpha, const unsigned int normalWidth) |
fits B-Spline curve to gradient features found in the image More... | |
void | Fit (const BIAS::Image< float > &featImg, const double &alpha, const unsigned int normalWidth, const double &minClip) |
fits B-Spline curve to gradient features found in the image More... | |
void | GetBoundingBox (int &minX, int &minY, int &maxX, int &maxY) |
returns the parameter of the bounding box of the curve More... | |
ContourBSplineType::Type | GetBType () |
returns type of B-Spline curve - possible values are Open, Closed or Cluster. More... | |
void | GetControlPoints (BIAS::Vector< double > &Q) |
returns a vector of control points; first entries are x-coordinates; last entries are y-coordinates More... | |
void | GetControlPoints (std::vector< BIAS::Vector2< double > > &cPnts) |
returns a vector of control points in x,y-coordinates More... | |
void | GetFeature (BIAS::Image< StorageType > &greyImg, const double &t, const unsigned int normalWidth, BIAS::Vector2< double > &res) |
returns the feature point with highest gradient along the normal in curve point located at "t" More... | |
void | GetFeature (BIAS::Image< StorageType > &greyImg, const double &t, const unsigned int normalWidth, const double &minClip, BIAS::Vector2< double > &res) |
returns the feature point with highest gradient along the normal in curve point located at "t" More... | |
void | GetFeature (const BIAS::Image< float > &featImg, const double &t, const unsigned int normalWidth, BIAS::Vector2< double > &res) |
returns the feature point with highest gradient along the normal in curve point located at "t" More... | |
void | GetFeature (const BIAS::Image< float > &featImg, const double &t, const unsigned int normalWidth, const double &minClip, BIAS::Vector2< double > &res) |
returns the feature point with highest gradient along the normal in curve point located at "t" More... | |
void | GetFeature (BIAS::Image< StorageType > &greyImg, const unsigned int normalWidth, const BIAS::Vector2< double > &curvePnt, const BIAS::Vector2< double > &normal, BIAS::Vector2< double > &res) |
returns the feature point with highest gradient along the normal in curve point "curvePnt" More... | |
void | GetFeature (BIAS::Image< StorageType > &greyImg, const unsigned int normalWidth, const BIAS::Vector2< double > &curvePnt, const BIAS::Vector2< double > &normal, const double &minClip, BIAS::Vector2< double > &res) |
returns the feature point with highest gradient along the normal in curve point "curvePnt" More... | |
void | GetFeature (const BIAS::Image< float > &featImg, const unsigned int normalWidth, const BIAS::Vector2< double > &curvePnt, const BIAS::Vector2< double > &normal, BIAS::Vector2< double > &res) |
returns the feature point with highest gradient along the normal in curve point "curvePnt" More... | |
void | GetFeature (const BIAS::Image< float > &featImg, const unsigned int normalWidth, const BIAS::Vector2< double > &curvePnt, const BIAS::Vector2< double > &normal, const double &minClip, BIAS::Vector2< double > &res) |
returns the feature point with highest gradient along the normal in curve point "curvePnt" More... | |
std::vector< unsigned int > | GetMultiplePoints () |
returns vector of multiple points; indicates which control points are modelled as edges More... | |
void | GetNormal (const double &t, BIAS::Vector2< double > &res) |
returns normal in curve point More... | |
unsigned int | GetOrder () |
returns order of B-Spline curve More... | |
void | GetPoint (const double &t, BIAS::Vector2< double > &res) |
returns point on the curve More... | |
void | Init (const unsigned int order, const ContourBSplineType::Type bType, const std::vector< BIAS::Vector2< double > > &cPnts) |
initialisation function for simple curve without edges More... | |
void | Init (const unsigned int order, const ContourBSplineType::Type bType, const std::vector< unsigned int > &mPnts, const std::vector< BIAS::Vector2< double > > &cPnts) |
initialisation function for curve with edges More... | |
void | Init (const unsigned int order, const ContourBSplineType::Type bType, const BIAS::Vector< double > &Q) |
initialisation function for simple curve without edges More... | |
void | Init (const unsigned int order, const ContourBSplineType::Type bType, const std::vector< unsigned int > &mPnts, const BIAS::Vector< double > &Q) |
initialisation function for curve with edges More... | |
bool | Load (const std::string &filename) |
load/initialise a ContourBSpline object from an given binary file More... | |
ContourDetectorBSpline & | operator= (const ContourDetectorBSpline< StorageType > &toCopy) |
copy operator More... | |
void | Rotate (const double &angle) |
rotates curve by angle (rad) More... | |
bool | Save (const std::string &filename) |
saves all values which are needed to reinitialise the object to a binary file More... | |
void | Scale (const double &scale) |
scales curve isotropic More... | |
void | ScaleX (const double &scale) |
scales curve in x-direction (horizontally) More... | |
void | ScaleY (const double &scale) |
scales curve in y-direction (vertically) More... | |
void | SetControlPoints (const std::vector< BIAS::Vector2< double > > &controlPoints) |
sets new control points More... | |
void | SetControlPoints (const BIAS::Vector< double > &Q) |
sets new control points More... | |
void | SetDrawSamples (unsigned int samples) |
sets the amount of sample points used to draw the B-Spline curve. More... | |
void | SetDrawSampleWidth (double width) |
sets the amount of sample points used to draw the B-Spline curve. More... | |
void | SetFitSamples (unsigned int samples) |
sets the amount of samples used to search features along the curve in fitting algorithm. More... | |
void | SetFitSampleWidth (double width) |
sets the amount of samples used to search features along the curve in fitting algorithm. More... | |
void | SetShapeSpaceEuclidian () |
sets spape-space for regularised fitting to euclidian similarities More... | |
void | SetShapeSpaceIdentity () |
sets spape-space for regularised fitting to identity More... | |
void | SetShapeSpaceMatrix (BIAS::Matrix< double > &shapeSpace) |
sets spape-space for regularised fitting More... | |
void | SetShapeSpacePlanarAffin () |
sets spape-space for regularised fitting to planar affine transformations More... | |
void | SetSubShapeSpaceEuclidian () |
set invariant shape-space for regularised fitting to euclidian similarities More... | |
void | SetSubShapeSpaceIdentity () |
set invariant shape-space for regularised fitting to identity More... | |
void | SetSubShapeSpaceMatrix (BIAS::Matrix< double > &subShapeSpace) |
set invariant shape-space for regularised fitting More... | |
void | SetSubShapeSpacePlanarAffin () |
set invariant shape-space for regularised fitting to planar affine transformation More... | |
void | SetSubShapeSpaceZero () |
set invariant shape-space for regularised fitting to zero More... | |
virtual | ~ContourDetectorBSpline () |
destructor More... | |
Static Public Member Functions | |
static ContourDetectorBSpline | Cluster (const std::vector< ContourDetectorBSpline< StorageType > > &bSplines) |
builds a new ContourBspline object from given vector of ContourBSpline objects More... | |
Protected Member Functions | |
void | CPntsToQ_ (const std::vector< BIAS::Vector2< double > > &cPnts) |
converts a given control point vector in x,y-coordinates to the internal used flat control point vector Q whose first entries are x-coordinates and last entries are y-coordinates More... | |
void | CPntsToQ_ (const std::vector< BIAS::Vector2< double > > &cPnts, BIAS::Vector< double > &Q) |
converts a given control point vector in x,y-coordinates to the internal used flat control point vector Q whose first entries are x-coordinates and last entries are y-coordinates More... | |
void | Fit_ (const BIAS::Image< float > &featImg, const double &alpha, const unsigned int normalWidth) |
fits the curve to a features curve with regularized fitting More... | |
void | Fit_ (const BIAS::Image< float > &featImg, const double &alpha, const unsigned int normalWidth, const double &minClip) |
fits the curve to a features curve with regularized fitting More... | |
void | GetFeatImage_ (BIAS::Image< StorageType > &greyImg, BIAS::Image< float > &featImg, const unsigned int normalWidth) |
converts given grey image to gradient image with ROI More... | |
void | GetNormal_ (const unsigned int numSpan, const double &s, BIAS::Vector2< double > &res) |
computes a normal at curve point which is parametrized by "numSpan" and "s" More... | |
void | GetPoint_ (const unsigned int numSpan, const double &s, BIAS::Vector2< double > &res) |
computes a point on curve More... | |
void | GetPointAndParamVec_ (const unsigned int numSpan, const double &s, BIAS::Vector< double > &resParamVec, BIAS::Vector2< double > &res) |
computes a point on curve and a parameter vector (byproduct) which can be used for computing a special matrix (U) in the fitting algorithm More... | |
void | InitCurve_ () |
initializes curve for drawing or for getting points on it More... | |
void | QToCPnts_ (std::vector< BIAS::Vector2< double > > &cPnts) |
converts a flat control point vector Q whose first entries are x-coordinates and last entries are y-coordinates to a control point vector with x,y-coordinates More... | |
void | QToCPnts_ (const BIAS::Vector< double > &Q, std::vector< BIAS::Vector2< double > > &cPnts) |
converts a flat control point vector Q whose first entries are x-coordinates and last entries are y-coordinates to a control point vector with x,y-coordinates More... | |
void | TestInit_ (const unsigned int order, const ContourBSplineType::Type bType, const std::vector< unsigned int > &mPnts, const BIAS::Vector< double > &Q) |
tests if B-Spline curve with given parameter can get initialized. More... | |
Protected Attributes | |
bool | curveInitialised_ |
bool to indicate a change of control points More... | |
std::vector< std::vector < BIAS::Vector< double > > > | curveVectors_ |
vectors needed to draw curve (determined by InitCurve_) More... | |
unsigned int | drawSamples_ |
amount of samples used in drawing algorithm More... | |
double * | drawSampleWidth_ |
distance of sample points in basis used in drawing algorithm More... | |
unsigned int | fitSamples_ |
amount of samples used in fitting algorithm More... | |
double * | fitSampleWidth_ |
distance of sample points in basis used in fitting algorithm More... | |
ContourBSplineData * | pData_ |
pointer to data of B-Spline curve initialised by call of Init(...) More... | |
ContourBSplineShapeMatrix * | pRegMatrix_ |
pointer to regularisation matrix object More... | |
ContourBSplineShapeMatrix * | pShapeSpaceMatrix_ |
pointer to shape-space matrix object More... | |
ContourBSplineShapeMatrix * | pSubShapeSpaceMatrix_ |
pointer to invariant shape-space matrix object More... | |
BIAS::Vector< double > | Q_ |
vector of control points; first entries are x-coordinates; last entries are y-coordinates More... | |
Private Member Functions | |
void | AddDebugLevel (const long int lv) |
void | AddDebugLevel (const std::string &name) |
long | ConsumeNextFreeDebuglevel_ () |
returns the next available debuglevel 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 |
int | GetMaxNumContours () |
return maximum number of contours More... | |
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 | 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 | SetMaxNumContours (const int maxnum) |
void | ShowDebugLevel (std::ostream &os=std::cout) const |
prints all internally known debuglevels More... | |
Static Private Member Functions | |
static long int | GetGlobalDebugLevel () |
static void | SetGlobalDebugLevel (long int lev) |
Private 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 |
std::vector< BIAS::BIASContour > | detectedContours_ |
int | dMaxNumContours_ |
maximum number of corners to return More... | |
Static Private Attributes | |
static std::ostream | _zDebugStream |
static long int | GlobalDebugLevel = 0 |
represents a special B-Spline and holds functions to handle fitting
This class represents a special B-Spline curve for "Active Contours". Based on book: "Active Contours" by Andrew Blake and Michael Isard. (http://www.robots.ox.ac.uk/~contours/)
Class offers functions to manipulate Position, Orientation and Scale of Curve, Drawing and Fitting Curve to gradient features in images.
USAGE construction: ContourBSpline bspline; //call constructor bspline.Init(...); //initialise B-Spline
The call of the Init(...) function looksup if the basis of the B-Spline is already computed. If not, a new ContourBSplineData Objects becomes generated, which holds data of this Object. If a B-Spline with same basis is available the pointer to the available ContourBSplineData gets copied. The purpose is to save/share memory. This is hidden to users of this class. After the Init(..) call, you can draw and manipulate the B-Spline.
For fitting you have to set (nonrecurring) Shape-Space, invariant Shape-Space (SubShapeSpace) and compute the Regularisation-Matrix. Look at "Active Contours" chapter 6 for details. In common cases you want to set Shape-Space to identity (SetShapeSpaceIdentity()) and invariant Shape-Space to planar affin transformations (SetSubShapeSpacePlanarAffin()).
USAGE fitting: bspline.SetShapeSpace...(...); bspline.SetSubShapeSpace...(...); bspline.ComputeRegularisationMatrix(); bspline.Fit(...);
The functions Set*ShapeSpace...(...) and ComputeRegulatisationMatrix() register/generate a ContourBSplineShapeMatrix object. The purpose is to save/share memory. This should be transparent to users of this class.
Definition at line 103 of file ContourDetectorBSpline.hh.
ContourDetectorBSpline::ContourDetectorBSpline | ( | ) |
standard constructor
Sets pointers to NULL and initialises some default values for Drawing and Fitting.
Definition at line 42 of file ContourDetectorBSpline.cpp.
|
inline |
copy constructor
[in] | toCopy | object to copy |
Uses operator= to copy referred B-Spline as new Object.
Definition at line 123 of file ContourDetectorBSpline.hh.
|
virtual |
destructor
Unregisters ContourBSplineData object (with reference counting). Unregisters ContourBSplineShapeMatrix objects (with reference counting).
Definition at line 55 of file ContourDetectorBSpline.cpp.
|
inline |
centers the curve by computing center over control points (not accurate!)
Definition at line 1249 of file ContourDetectorBSpline.hh.
|
static |
builds a new ContourBspline object from given vector of ContourBSpline objects
[in] | bSplines | vector of ContourBSpline objects to cluster |
With this function you can cluster B-Spline curves in one B-Spline curve. For example you can represent the contour of glasses with one B-Spline curve constructed of two closed B-Spline curves.
Definition at line 76 of file ContourDetectorBSpline.cpp.
References BIAS::ContourBSplineData::numBasePolynoms_, BIAS::ContourDetectorBSpline< StorageType >::pData_, BIAS::ContourDetectorBSpline< StorageType >::Q_, and BIAS::ContourBSplineData::Register().
|
inline |
computes the regularisation matrix needed for fitting algorithm.
The regularisation matrix for the fitting algorithm gets computed. You have to set shape-space and invariant shape-space before! Different to the book "Active Contours" the regularisation factor alpha isnt included in the resulting matrix.
Usage: bspline.SetShapeSpace...(...); bspline.SetSubShapeSpace...(...); bspline.ComputeRegularisationMatrix();
Definition at line 1356 of file ContourDetectorBSpline.hh.
References BIAS::ContourBSplineShapeMatrix::ComputeRegularisationMatrix().
|
protected |
converts a given control point vector in x,y-coordinates to the internal used flat control point vector Q whose first entries are x-coordinates and last entries are y-coordinates
[in] | cPnts | vector of control points in x,y-coordinates |
Definition at line 754 of file ContourDetectorBSpline.cpp.
|
protected |
converts a given control point vector in x,y-coordinates to the internal used flat control point vector Q whose first entries are x-coordinates and last entries are y-coordinates
[in] | cPnts | vector of control points in x,y-coordinates |
[out] | Q | vector of control points; first entries are x-coordinates; last entries are y-coordinates |
Definition at line 767 of file ContourDetectorBSpline.cpp.
References TNT::Vector< T >::newsize().
|
virtual |
detect function, unfinished
Implements BIAS::ContourDetectorBase< StorageType >.
Definition at line 65 of file ContourDetectorBSpline.cpp.
|
inline |
displace all control points
[in] | x | x-offset to x-coordinates of control points |
[in] | y | y-offset to y-coordinates of control points |
Definition at line 1208 of file ContourDetectorBSpline.hh.
void ContourDetectorBSpline::DrawControlPoints | ( | BIAS::Image< StorageType > & | img, |
const StorageType | color[3] | ||
) |
draws the control points of the B-Spline curve into image
[out] | img | output image |
[in] | color |
Definition at line 618 of file ContourDetectorBSpline.cpp.
References BIAS::ImageDraw< StorageType >::CircleCenterFilled().
void ContourDetectorBSpline::DrawCurve | ( | BIAS::Image< StorageType > & | img, |
const StorageType | color[3] | ||
) |
draws B-Spline curve into image
[out] | img | output image |
[in] | color | Draws B-Spline curve into given image. Uses amount of samples given by SetDrawSampleWidth(...) of SetDrawSamples(...). If amount of samples isnt given by these function a default amount is used. |
Definition at line 634 of file ContourDetectorBSpline.cpp.
References BIAS::ImageDraw< StorageType >::Line().
void ContourDetectorBSpline::DrawCurve | ( | BIAS::Image< float > & | img | ) |
draws B-Spline curve into image
[out] | img | output image |
Draws B-Spline curve into given image. Uses amount of samples given by SetDrawSampleWidth(...) or SetDrawSamples(...). If amount of samples isnt given by these function a default amount is used.
Definition at line 669 of file ContourDetectorBSpline.cpp.
References BIAS::ImageDraw< StorageType >::Line().
void ContourDetectorBSpline::DrawNormals | ( | const unsigned int | normalWidth, |
BIAS::Image< StorageType > & | img, | ||
const StorageType | color[3] | ||
) |
draws B-Spline normals into image
[out] | img | output image |
Draws normals along the B-Spline curve into given image. Uses amount of samples given by SetFitSampleWidth(...) or SetFitSamples(...). If amount of samples isnt given a default amount is used.
Definition at line 704 of file ContourDetectorBSpline.cpp.
References BIAS::ImageDraw< StorageType >::Line().
void ContourDetectorBSpline::Fit | ( | BIAS::Image< StorageType > & | greyImg, |
const double & | alpha, | ||
const unsigned int | normalWidth | ||
) |
fits B-Spline curve to gradient features found in the image
[in] | greyImg | input image |
[in] | alpha | regularisation factor for fitting |
[in] | normalWidth | width of normal for searching gradient features |
The input image gets converted to a single gradient image. A ROI gets computed from controlpoints and the width to search for features (normalWidth).
Along the curve normals get computed. Number of normals depends on variable fitSampleWidth_ (SetFitSampleWidth(...)). Along the normals the feature points get assigned by the image points width highest gradient and distance less then normalWidth from curve (in both directions). Thus a feature curve is given.
The fitting algorithm is described in the book "Active Contours", chapter 6. The parameter alpha determines the regularisation of the fitting. For numeric stability alpha has to be greater than 0 even if no regularisation is forced. the regularisation determines how the curve should be fitted to the feature curve. high values of alpha cause the fitted curve to keep the ground shape and only adapt position, orientation and scale. small values causes a possibly distorted shape which could have nothing in common with the initial curve.
Definition at line 210 of file ContourDetectorBSpline.cpp.
void ContourDetectorBSpline::Fit | ( | BIAS::Image< StorageType > & | greyImg, |
const double & | alpha, | ||
const unsigned int | normalWidth, | ||
const double & | minClip | ||
) |
fits B-Spline curve to gradient features found in the image
[in] | greyImg | input image |
[in] | alpha | regularisation factor for fitting |
[in] | normalWidth | width of normal for searching gradient features |
[in] | minClip | value of image gradients which are discarded in the search after feature points |
The input image gets converted to a single gradient image. A ROI gets computed from controlpoints and the width to search for features (normalWidth).
Along the curve normals get computed. Number of normals depends on variable fitSampleWidth_ (SetFitSampleWidth(...)). Along the normals the feature points get assigned by the image points width highest gradient and distance less then normalWidth from curve (in both directions). Image gradients with a value less than parameter minClip are discarded. Thus a feature curve is given.
The fitting algorithm is described in the book "Active Contours", chapter 6. The parameter alpha determines the regularisation of the fitting. For numeric stability alpha has to be greater than 0 even if no regularisation is forced. the regularisation determines how the curve should be fitted to the feature curve. high values of alpha cause the fitted curve to keep the ground shape and only adapt position, orientation and scale. small values causes a possibly distorted shape which could have nothing in common with the initial curve.
Definition at line 225 of file ContourDetectorBSpline.cpp.
void ContourDetectorBSpline::Fit | ( | const BIAS::Image< float > & | featImg, |
const double & | alpha, | ||
const unsigned int | normalWidth | ||
) |
fits B-Spline curve to gradient features found in the image
[in] | featImg | input gradient image |
[in] | alpha | regularisation factor for fitting |
[in] | normalWidth | width of normal for searching gradient features |
Along the curve normals get computed. Number of normals depends on variable fitSampleWidth_ (SetFitSampleWidth(...)). Along the normals the feature points get assigned by the image points width highest gradient and distance less then normalWidth from curve (in both directions). Thus a feature curve is given.
The fitting algorithm is described in the book "Active Contours", chapter 6. The parameter alpha determines the regularisation of the fitting. For numeric stability alpha has to be greater than 0 even if no regularisation is forced. the regularisation determines how the curve should be fitted to the feature curve. high values of alpha cause the fitted curve to keep the ground shape and only adapt position, orientation and scale. small values causes a possibly distorted shape which could have nothing in common with the initial curve.
Definition at line 241 of file ContourDetectorBSpline.cpp.
void ContourDetectorBSpline::Fit | ( | const BIAS::Image< float > & | featImg, |
const double & | alpha, | ||
const unsigned int | normalWidth, | ||
const double & | minClip | ||
) |
fits B-Spline curve to gradient features found in the image
[in] | featImg | input gradient image |
[in] | alpha | regularisation factor for fitting |
[in] | normalWidth | width of normal for searching gradient features |
[in] | minClip | value of image gradients which are discarded in the search after feature points |
Along the curve normals get computed. Number of normals depends on variable fitSampleWidth_ (SetFitSampleWidth(...)). Along the normals the feature points get assigned by the image points width highest gradient and distance less then normalWidth from curve (in both directions). Image gradients with a value less than parameter minClip are discarded. Thus a feature curve is given.
The fitting algorithm is described in the book "Active Contours", chapter 6. The parameter alpha determines the regularisation of the fitting. For numeric stability alpha has to be greater than 0 even if no regularisation is forced. the regularisation determines how the curve should be fitted to the feature curve. high values of alpha cause the fitted curve to keep the ground shape and only adapt position, orientation and scale. small values causes a possibly distorted shape which could have nothing in common with the initial curve.
Definition at line 251 of file ContourDetectorBSpline.cpp.
|
protected |
fits the curve to a features curve with regularized fitting
[in] | featImage | input gradient image |
[in] | alpha | regularisation factor |
[in] | normalWidth | length of normal used to search for feature curve |
Internal used function to fit the B-Spline curve to a feature curve. The feature curve is determined by searching for image points with highest gradients along the normals at the curve. Parameter "normalWidth" determines the maximal distance of feature point to curve (in both directions).
More details in function Fit(..) and book "Active Contours" chapter 6.
Definition at line 977 of file ContourDetectorBSpline.cpp.
References BIAS::SVD::Invert(), BIAS::Matrix< T >::Mult(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), BIAS::Vector< T >::OuterProduct(), BIAS::Vector< T >::SetZero(), and BIAS::Matrix< T >::SetZero().
|
protected |
fits the curve to a features curve with regularized fitting
[in] | featImage | input gradient image |
[in] | alpha | regularisation factor |
[in] | normalWidth | length of normal used to search for feature curve |
[in] | minClip | gradients less than "minClip" are discarded in search for feature points |
Internal used function to fit the B-Spline curve to a feature curve. The feature curve is determined by searching for image points with highest gradients along the normals at the curve. Parameter "normalWidth" determines the maximal distance of feature point to curve (in both directions).
More details in function Fit(..) and book "Active Contours" chapter 6.
Definition at line 1074 of file ContourDetectorBSpline.cpp.
References BIAS::SVD::Invert(), BIAS::Matrix< T >::Mult(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultLeft(), BIAS::Vector< T >::OuterProduct(), BIAS::Vector< T >::SetZero(), and BIAS::Matrix< T >::SetZero().
void ContourDetectorBSpline::GetBoundingBox | ( | int & | minX, |
int & | minY, | ||
int & | maxX, | ||
int & | maxY | ||
) |
returns the parameter of the bounding box of the curve
[out] | minX | x-coordinate of top left corner of bounding box |
[out] | minY | y-coordinate of top left corner of bounding box |
[out] | maxX | x-coordinate of bottom right corner of bounding box |
[out] | maxX | y-coordinate of bottom right corner of bounding box |
Definition at line 583 of file ContourDetectorBSpline.cpp.
|
inline |
returns type of B-Spline curve - possible values are Open, Closed or Cluster.
Definition at line 1418 of file ContourDetectorBSpline.hh.
|
inline |
returns a vector of control points; first entries are x-coordinates; last entries are y-coordinates
[out] | Q | vector of control points |
Definition at line 630 of file ContourDetectorBSpline.hh.
|
inline |
returns a vector of control points in x,y-coordinates
[out] | cPnts | vector of control points in x,y-coordinates |
Definition at line 636 of file ContourDetectorBSpline.hh.
|
protected |
converts given grey image to gradient image with ROI
[in] | greyImg | input grey image |
[out] | featImg | output gradient image |
[in] | normalWidth | used to determine ROI |
Converts a given grey image to a gradient image. gradient image is needed for the fitting algorithm. In the fitting algorithm only a small region of the image is of interest for searching feature points. Thus a ROI gets computed from a bounding box of the curve and the parameter "normalWidth". Parameter "normalWidth" determines how far along curve normal a feature point gets searched.
Definition at line 1174 of file ContourDetectorBSpline.cpp.
References BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Filter(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::SetROICorners(), and BIAS::ImageBase::UnsetROI().
void ContourDetectorBSpline::GetFeature | ( | BIAS::Image< StorageType > & | greyImg, |
const double & | t, | ||
const unsigned int | normalWidth, | ||
BIAS::Vector2< double > & | res | ||
) |
returns the feature point with highest gradient along the normal in curve point located at "t"
[in] | greyImg | input grey image |
[in] | t | sample point in [0,1] |
[in] | normalWidth | length of normal for searching gradient feature along normal in curve point at "t" |
[out] | res | resulting feature point |
The input image gets converted to a single gradient image. A ROI gets computed from controlpoints and the width to search for feature (normalWidth).
Parameter "t" is used to sample the basis of the curve and computing the curve point at "t". the normal at this curve point gets computed. Along this normal (in both directions) the image point width the highest gradient gets determined. The resulting features point has distance less equal than "normalWidth" to curve point.
Definition at line 476 of file ContourDetectorBSpline.cpp.
void ContourDetectorBSpline::GetFeature | ( | BIAS::Image< StorageType > & | greyImg, |
const double & | t, | ||
const unsigned int | normalWidth, | ||
const double & | minClip, | ||
BIAS::Vector2< double > & | res | ||
) |
returns the feature point with highest gradient along the normal in curve point located at "t"
[in] | greyImg | input grey image |
[in] | t | sample point in [0,1] |
[in] | normalWidth | length of normal for searching gradient feature along normal in curve point at "t" |
[in] | minClip | value of image gradients which are discarded in the search after the feature point |
[out] | res | resulting feature point |
The input image gets converted to a single gradient image. A ROI gets computed from controlpoints and the width to search for feature (normalWidth).
Parameter "t" is used to sample the basis of the curve and computing the curve point at "t". the normal at this curve point gets computed. Along this normal (in both directions) the image point width the highest gradient gets determined. image gradients less than "minClip" get discarded. The resulting features point has distance less equal then "normalWidth" to curve point.
Definition at line 491 of file ContourDetectorBSpline.cpp.
void ContourDetectorBSpline::GetFeature | ( | const BIAS::Image< float > & | featImg, |
const double & | t, | ||
const unsigned int | normalWidth, | ||
BIAS::Vector2< double > & | res | ||
) |
returns the feature point with highest gradient along the normal in curve point located at "t"
[in] | featImg | input gradient image |
[in] | t | sample point in [0,1] |
[in] | normalWidth | length of normal for searching gradient feature along normal in curve point at "t" |
[out] | res | resulting feature point |
Parameter "t" is used to sample the basis of the curve and computing the curve point at "t". the normal at this curve point gets computed. Along this normal (in both directions) the image point width the highest gradient gets determined. The resulting feature point has distance less equal than "normalWidth" to curve point.
Definition at line 507 of file ContourDetectorBSpline.cpp.
void ContourDetectorBSpline::GetFeature | ( | const BIAS::Image< float > & | featImg, |
const double & | t, | ||
const unsigned int | normalWidth, | ||
const double & | minClip, | ||
BIAS::Vector2< double > & | res | ||
) |
returns the feature point with highest gradient along the normal in curve point located at "t"
[in] | featImg | input gradient image |
[in] | t | sample point in [0,1] |
[in] | normalWidth | length of normal for searching gradient feature along normal at curve point at "t" |
[in] | minClip | value of image gradients which are discarded in the search after the feature point |
[out] | res | resulting feature point |
Parameter "t" is used to sample the basis of the curve and computing the curve point at "t". the normal at this curve point gets computed. Along this normal (in both directions) the image point width the highest gradient gets determined. image gradients less than "minClip" get discarded. The resulting feature point has distance less equal than "normalWidth" to curve point.
Definition at line 545 of file ContourDetectorBSpline.cpp.
|
inline |
returns the feature point with highest gradient along the normal in curve point "curvePnt"
[in] | greyImg | input grey image |
[in] | normalWidth | length of normal for searching gradient feature along normal at curve point "curvePnt" |
[in] | curvePnt | point on the curve which is start point for the search for feature point |
[in] | normal | normal at curve point "curvePnt" |
[out] | res | resulting feature point |
The input image gets converted to a single gradient image. A ROI gets computed from controlpoints and the width to search for feature (normalWidth).
Along the normal (in both directions) at curve point "curvePnt" the image point width the highest gradient gets determined. The resulting feature point has distance less equal than "normalWidth" to the curve point.
Definition at line 1431 of file ContourDetectorBSpline.hh.
|
inline |
returns the feature point with highest gradient along the normal in curve point "curvePnt"
[in] | greyImg | input grey image |
[in] | normalWidth | length of normal for searching gradient feature along normal at curve point "curvePnt" |
[in] | curvePnt | point on the curve which is start point for the search for feature point |
[in] | normal | normal at curve point "curvePnt" |
[in] | minClip | value of image gradients which are discarded in the search for the feature point |
[out] | res | resulting feature point |
The input image gets converted to a single gradient image. A ROI gets computed from controlpoints and the width to search for feature (normalWidth).
Along the normal (in both directions) at curve point "curvePnt" the image point width the highest gradient gets determined. Image gradients less than "minClip"get discarded.The resulting feature point has distance less equal than "normalWidth" to the curve point.
Definition at line 1443 of file ContourDetectorBSpline.hh.
void ContourDetectorBSpline::GetFeature | ( | const BIAS::Image< float > & | featImg, |
const unsigned int | normalWidth, | ||
const BIAS::Vector2< double > & | curvePnt, | ||
const BIAS::Vector2< double > & | normal, | ||
BIAS::Vector2< double > & | res | ||
) |
returns the feature point with highest gradient along the normal in curve point "curvePnt"
[in] | featImg | input gradient image |
[in] | normalWidth | length of normal for searching gradient feature along normal at curve point "curvePnt" |
[in] | curvePnt | point on the curve which is start point for the search for feature point |
[in] | normal | normal at curve point "curvePnt" |
[out] | res | resulting feature point |
Along the normal (in both directions) at curve point "curvePnt" the image point width the highest gradient gets determined. The resulting feature point has distance less equal than "normalWidth" to the curve point.
Definition at line 869 of file ContourDetectorBSpline.cpp.
References BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), and BIAS::Image< StorageType >::PixelValue().
void ContourDetectorBSpline::GetFeature | ( | const BIAS::Image< float > & | featImg, |
const unsigned int | normalWidth, | ||
const BIAS::Vector2< double > & | curvePnt, | ||
const BIAS::Vector2< double > & | normal, | ||
const double & | minClip, | ||
BIAS::Vector2< double > & | res | ||
) |
returns the feature point with highest gradient along the normal in curve point "curvePnt"
[in] | greyImg | input gradient image |
[in] | normalWidth | length of normal for searching gradient feature along normal at curve point "curvePnt" |
[in] | curvePnt | point on the curve which is start point for the search for feature point |
[in] | normal | normal at curve point "curvePnt" |
[in] | minClip | value of image gradients which are discarded in the search for the feature point |
[out] | res | resulting feature point |
Along the normal (in both directions) at curve point "curvePnt" the image point width the highest gradient gets determined. Image gradients less than "minClip"get discarded.The resulting feature point has distance less equal than "normalWidth" to the curve point.
Definition at line 922 of file ContourDetectorBSpline.cpp.
References BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), and BIAS::Image< StorageType >::PixelValue().
|
inline |
returns vector of multiple points; indicates which control points are modelled as edges
Definition at line 1424 of file ContourDetectorBSpline.hh.
void ContourDetectorBSpline::GetNormal | ( | const double & | t, |
BIAS::Vector2< double > & | res | ||
) |
returns normal in curve point
[in] | t | sample point in [0,1] |
[out] | res | resulting normal |
Parameter "t" is used to sample the basis of curve and compute the normal in curve point at "t".
Definition at line 448 of file ContourDetectorBSpline.cpp.
|
protected |
computes a normal at curve point which is parametrized by "numSpan" and "s"
[in] | numSpan | span of curve in which normal is located |
[in] | s | sample point of span in [0,1] |
[out] | res | resulting normal |
This function is internal used to compute a normal at a curve point. Each B-Spline-Curve consists of a number of spans. The curve point is parameterized by "numSpan" and "s".
Definition at line 835 of file ContourDetectorBSpline.cpp.
References BIAS::Vector2< T >::NormL2(), and BIAS::Vector< T >::ScalarProduct().
|
inline |
returns order of B-Spline curve
Definition at line 1412 of file ContourDetectorBSpline.hh.
void ContourDetectorBSpline::GetPoint | ( | const double & | t, |
BIAS::Vector2< double > & | res | ||
) |
returns point on the curve
[in] | t | sample point in [0,1] |
[out] | res | resulting point |
Parameter "t" is used to sample the basis of curve and compute the curve point at "t".
Definition at line 420 of file ContourDetectorBSpline.cpp.
|
inlineprotected |
computes a point on curve
[in] | numSpan | span of curve in which point is located |
[in] | s | sample point of span in [0,1] |
[out] | res | resulting point on curve |
This function is internal used to compute a point on a curve. Each B-Spline-Curve consist of a number of spans. Parameter "numSpan" and "s" are used to sample the curve basis.
Definition at line 1456 of file ContourDetectorBSpline.hh.
|
protected |
computes a point on curve and a parameter vector (byproduct) which can be used for computing a special matrix (U) in the fitting algorithm
[in] | numSpan | span of curve in which point is located |
[in] | s | sample point of span in [0,1] |
[out] | resParamVec | special parameter vector (byproduct) used in fitting algorithm |
[out] | res | resulting point on curve |
This function is internal used to compute a point on a curve. Each B-Spline-Curve consist of a number of spans. Parameter "numSpan" and "s" are used to sample the curve basis. Parameter "resParamVec" is a byproduct of curve point computation. It is build up on basis of "s" and can be used to compute the special matrix "U" in fitting algorihm. More information about "U" can be found in the book "Active Contours".
Definition at line 806 of file ContourDetectorBSpline.cpp.
References TNT::Vector< T >::newsize(), and BIAS::Vector< T >::ScalarProduct().
void ContourDetectorBSpline::Init | ( | const unsigned int | order, |
const ContourBSplineType::Type | bType, | ||
const std::vector< BIAS::Vector2< double > > & | cPnts | ||
) |
initialisation function for simple curve without edges
[in] | order | order of B-Spline curve (implies degree) |
[in] | bType | type of curve: Open or Closed |
[in] | cPnts | control points of curve with x,y-coordinates |
Generates/registers basis for B-Spline curve without edges transparently.
Example: bspline.Init(order,BIAS::ContourBSplineType::Open,cPnts);
Definition at line 123 of file ContourDetectorBSpline.cpp.
void ContourDetectorBSpline::Init | ( | const unsigned int | order, |
const ContourBSplineType::Type | bType, | ||
const std::vector< unsigned int > & | mPnts, | ||
const std::vector< BIAS::Vector2< double > > & | cPnts | ||
) |
initialisation function for curve with edges
[in] | order | order of B-Spline curve (implies degree) |
[in] | bType | type of curve: Open or Closed |
[in] | mPnts | multiplicity of control points |
[in] | cPnts | control points of curve with x,y-coordinates |
Generates/registers basis for B-Spline curve with edges transparently.
Param vector mPnts must have same length as vector of control points. A multiplicity of "order-1" at index "i" implies an edge in the curve at control point with index "i".
If type of the curve is "Open" the first control point with an edge is only possible at index "order-1" (begin counting with zero). Last possible control point with an edge is "last index - (order-1)". Edges in control points must have distance in indices of "order-1". Example: If order==3 (quadratic B-Spline) and there is an edge in control point with index 2 (mPnts[2]=2) then the next possible edge is in control point with index 4 (mPnts[4]=2).
If type of curve is "Closed" the indicies of control points with edges must have periodic distance of "order-1". Exampe: If order==3 (quadratic B-Spline) and there is an edge in control point with index 0 (mPnts[0]=2) then the next possible edge is in control point with index 2 (mPnts[2]=2). Periodic distance means that the last possible edge is at index "last index - 1" in this case.
Definition at line 109 of file ContourDetectorBSpline.cpp.
void ContourDetectorBSpline::Init | ( | const unsigned int | order, |
const ContourBSplineType::Type | bType, | ||
const BIAS::Vector< double > & | Q | ||
) |
initialisation function for simple curve without edges
[in] | order | order of B-Spline curve (implies degree) |
[in] | bType | type of curve: Open or Closed |
[in] | Q | control points of curve first all x-coordinates then all y-coordinates (adopted from book "Active Contours") Q= (x) - vector of x-coordinates (y) - vector of y-coordinates |
Generates/registers basis for B-Spline curve without edges transparently.
Definition at line 159 of file ContourDetectorBSpline.cpp.
References BIAS::Vector< T >::Size().
void ContourDetectorBSpline::Init | ( | const unsigned int | order, |
const ContourBSplineType::Type | bType, | ||
const std::vector< unsigned int > & | mPnts, | ||
const BIAS::Vector< double > & | Q | ||
) |
initialisation function for curve with edges
[in] | order | order of B-Spline curve (implies degree) |
[in] | bType | type of curve: Open or Closed |
[in] | mPnts | multiplicity of control points |
[in] | Q | control points of curve first all x-coordinates then all y-coordinates (adopted from book "Active Contours") Q= (x) - vector of x-coordinates (y) - vector of y-coordinates |
Generates/registers basis for B-Spline curve with edges transparently.
Param vector mPnts must have same length as vector of control points. A multiplicity of "order-1" at index "i" implies an edge in the curve at control point with index "i".
If type of the curve is "Open" the first control point with an edge is only possible at index "order-1" (begin counting with zero). Last possible control point with an edge is "last index - (order-1)". Edges in control points must have distance in indices of "order-1". Example: If order==3 (quadratic B-Spline) and there is an edge in control point with index 2 (mPnts[2]=2) then the next possible edge is in control point with index 4 (mPnts[4]=2).
If type of curve is "Closed" the indicies of control points with edges must have periodic distance of "order-1". Exampe: If order==3 (quadratic B-Spline) and there is an edge in control point with index 0 (mPnts[0]=2) then the next possible edge is in control point with index 2 (mPnts[2]=2). Periodic distance means that the last possible edge is at index "last index - 1" in this case.
Definition at line 139 of file ContourDetectorBSpline.cpp.
References BIAS::ContourBSplineData::Register().
|
protected |
initializes curve for drawing or for getting points on it
Computes curve vectors needed for determine the shape of the curve. Depends on the basis and the current controlpoints.
Definition at line 170 of file ContourDetectorBSpline.cpp.
References BIAS::Matrix< T >::clear(), BIAS::Matrix< T >::GetCol(), and BIAS::Matrix< T >::MultLeft().
bool ContourDetectorBSpline::Load | ( | const std::string & | filename | ) |
load/initialise a ContourBSpline object from an given binary file
[in] | filename | name of source file |
Definition at line 319 of file ContourDetectorBSpline.cpp.
References BIAS::ContourBSplineType::Cluster, and BIAS::ContourBSplineData::Register().
|
inline |
copy operator
[in] | toCopy | object to copy |
Definition at line 1161 of file ContourDetectorBSpline.hh.
References BIAS::ContourDetectorBSpline< StorageType >::drawSamples_, BIAS::ContourDetectorBSpline< StorageType >::drawSampleWidth_, BIAS::ContourDetectorBSpline< StorageType >::fitSamples_, BIAS::ContourDetectorBSpline< StorageType >::fitSampleWidth_, BIAS::ContourDetectorBSpline< StorageType >::pData_, BIAS::ContourDetectorBSpline< StorageType >::pRegMatrix_, BIAS::ContourDetectorBSpline< StorageType >::pShapeSpaceMatrix_, BIAS::ContourDetectorBSpline< StorageType >::pSubShapeSpaceMatrix_, and BIAS::ContourDetectorBSpline< StorageType >::Q_.
|
protected |
converts a flat control point vector Q whose first entries are x-coordinates and last entries are y-coordinates to a control point vector with x,y-coordinates
[out] | cPnts | control point vector with x,y-coordinates |
Definition at line 781 of file ContourDetectorBSpline.cpp.
|
protected |
converts a flat control point vector Q whose first entries are x-coordinates and last entries are y-coordinates to a control point vector with x,y-coordinates
[in] | Q | vector of control points; first entries are x-coordinates; last entries are y-coordinates |
[out] | cPnts | control point vector with x,y-coordinates |
Definition at line 793 of file ContourDetectorBSpline.cpp.
References TNT::Vector< T >::size().
void ContourDetectorBSpline::Rotate | ( | const double & | angle | ) |
rotates curve by angle (rad)
[in] | angle | rotation angle |
Rotates curve by angle. Curve must have its origin at zero! There is no test!
Definition at line 399 of file ContourDetectorBSpline.cpp.
References BIAS::Matrix2x2< T >::Mult().
bool ContourDetectorBSpline::Save | ( | const std::string & | filename | ) |
saves all values which are needed to reinitialise the object to a binary file
[in] | filename | name of destination file |
Definition at line 261 of file ContourDetectorBSpline.cpp.
References BIAS::ContourBSplineType::Cluster.
|
inline |
scales curve isotropic
[in] | scale | scaling factor |
Scales the curve by factor "scale". Curve must have its origin at zero! There is no test!
Definition at line 1219 of file ContourDetectorBSpline.hh.
|
inline |
scales curve in x-direction (horizontally)
[in] | scale | scaling factor |
Scales the curve by factor "scale" horizontally. Curve must have its origin at zero! There is no test!
Definition at line 1229 of file ContourDetectorBSpline.hh.
|
inline |
scales curve in y-direction (vertically)
[in] | scale | scaling factor |
Scales the curve by factor "scale" vertically. Curve must have its origin at zero! There is no test!
Definition at line 1239 of file ContourDetectorBSpline.hh.
|
inline |
sets new control points
[in] | controlPoints | vector of control points with x,y-coordinates |
Definition at line 1191 of file ContourDetectorBSpline.hh.
|
inline |
sets new control points
[in] | Q | vector of control points consisting of vector of x-coordinates and of vector of y-coordinates Q= (x) vector of x-coordinates (y) vector of y-coordinates |
Definition at line 1200 of file ContourDetectorBSpline.hh.
|
inline |
sets the amount of sample points used to draw the B-Spline curve.
[in] | samples | amount of samples used to draw curve |
Sets amount of samples which are used to draw the curve. Distance between sample points gets computed (sample width). the sample width is equidistant in sampling the basis of the curve, but not in sampling the curve points!
Definition at line 1403 of file ContourDetectorBSpline.hh.
|
inline |
sets the amount of sample points used to draw the B-Spline curve.
[in] | width | distance of sample points along the curve (<1.0) |
Computes the amount of samples which are used to draw the curve. These sample points have distance "width". "width" should be considerably <1.0. the sample width is equidistant in sampling the basis of the curve, but not in sampling the curve points!
Definition at line 1393 of file ContourDetectorBSpline.hh.
|
inline |
sets the amount of samples used to search features along the curve in fitting algorithm.
[in] | samples | amount of samples used to search features |
Sets amount of samples which are used to search features along the curve in the fitting algorithm. Distance between sample points gets computed (sample width). the sample width is equidistant in sampling the basis of the curve, but not in sampling the curve points!
Definition at line 1383 of file ContourDetectorBSpline.hh.
|
inline |
sets the amount of samples used to search features along the curve in fitting algorithm.
[in] | width | distance of sample points along the curve (<1.0) |
Computes the amount of samples which are used to search features along the curve in the fitting algorithm. These sample points have distance "width". "width" should be considerably <1.0. the sample width is equidistant in sampling the basis of the curve, but not in sampling the curve points!
Definition at line 1373 of file ContourDetectorBSpline.hh.
|
inline |
sets spape-space for regularised fitting to euclidian similarities
Read book "Active Contours" chapter 6 for details.
Definition at line 1285 of file ContourDetectorBSpline.hh.
References BIAS::ContourBSplineShapeMatrix::SetShapeSpaceEuclidian().
|
inline |
sets spape-space for regularised fitting to identity
Read book "Active Contours" chapter 6 for details. If youre not sure which shape-space to set... set this.
Definition at line 1275 of file ContourDetectorBSpline.hh.
References BIAS::ContourBSplineShapeMatrix::SetShapeSpaceIdentity().
|
inline |
sets spape-space for regularised fitting
[in] | shapeSpace | matrix of shape-space |
Read book "Active Contours" chapter 6 for details.
Definition at line 1264 of file ContourDetectorBSpline.hh.
References BIAS::ContourBSplineShapeMatrix::SetShapeSpaceMatrix().
|
inline |
sets spape-space for regularised fitting to planar affine transformations
Read book "Active Contours" chapter 6 for details.
Definition at line 1295 of file ContourDetectorBSpline.hh.
References BIAS::ContourBSplineShapeMatrix::SetShapeSpacePlanarAffin().
|
inline |
set invariant shape-space for regularised fitting to euclidian similarities
Read book "Active Contours" chapter 6 for details.
Definition at line 1326 of file ContourDetectorBSpline.hh.
References BIAS::ContourBSplineShapeMatrix::SetShapeSpaceEuclidian().
|
inline |
set invariant shape-space for regularised fitting to identity
Read book "Active Contours" chapter 6 for details.
Definition at line 1316 of file ContourDetectorBSpline.hh.
References BIAS::ContourBSplineShapeMatrix::SetShapeSpaceIdentity().
|
inline |
set invariant shape-space for regularised fitting
[in] | subShapeSpace | matrix of invariant shape-space |
Read book "Active Contours" chapter 6 for details.
Definition at line 1305 of file ContourDetectorBSpline.hh.
References BIAS::ContourBSplineShapeMatrix::SetShapeSpaceMatrix().
|
inline |
set invariant shape-space for regularised fitting to planar affine transformation
Read book "Active Contours" chapter 6 for details.
Definition at line 1336 of file ContourDetectorBSpline.hh.
References BIAS::ContourBSplineShapeMatrix::SetShapeSpacePlanarAffin().
|
inline |
set invariant shape-space for regularised fitting to zero
If you set invariant shape-space matrix to zero, you have to set the normal shape-space before (SetShapeSpace...(...))!
Read book "Active Contours" chapter 6 for details.
Definition at line 1346 of file ContourDetectorBSpline.hh.
References BIAS::ContourBSplineShapeMatrix::SetSubShapeSpaceZero().
|
protected |
tests if B-Spline curve with given parameter can get initialized.
[in] | order | order of B-Spline curve |
[in] | bType | type of B-Spline curve (Open or Closed) |
[in] | mPnts | vector of multiplicities - determines which control points are modelled as edges |
[in] | Q | vector of control points |
Test if B-Spline curve with given parameter can get initialised. Most important test if mPnts is correct. That means if edges could be generated in these control points.
Definition at line 1205 of file ContourDetectorBSpline.cpp.
References BIAS::ContourBSplineType::Closed, BIAS::ContourBSplineType::Open, BIAS::Vector< T >::Size(), and TNT::Vector< T >::size().
|
protected |
bool to indicate a change of control points
Definition at line 1139 of file ContourDetectorBSpline.hh.
|
protected |
vectors needed to draw curve (determined by InitCurve_)
Definition at line 1137 of file ContourDetectorBSpline.hh.
|
protected |
amount of samples used in drawing algorithm
Definition at line 1155 of file ContourDetectorBSpline.hh.
Referenced by BIAS::ContourDetectorBSpline< StorageType >::operator=().
|
protected |
distance of sample points in basis used in drawing algorithm
Definition at line 1151 of file ContourDetectorBSpline.hh.
Referenced by BIAS::ContourDetectorBSpline< StorageType >::operator=().
|
protected |
amount of samples used in fitting algorithm
Definition at line 1153 of file ContourDetectorBSpline.hh.
Referenced by BIAS::ContourDetectorBSpline< StorageType >::operator=().
|
protected |
distance of sample points in basis used in fitting algorithm
Definition at line 1149 of file ContourDetectorBSpline.hh.
Referenced by BIAS::ContourDetectorBSpline< StorageType >::operator=().
|
protected |
pointer to data of B-Spline curve initialised by call of Init(...)
Definition at line 1134 of file ContourDetectorBSpline.hh.
Referenced by BIAS::ContourDetectorBSpline< StorageType >::Cluster(), and BIAS::ContourDetectorBSpline< StorageType >::operator=().
|
protected |
pointer to regularisation matrix object
Definition at line 1146 of file ContourDetectorBSpline.hh.
Referenced by BIAS::ContourDetectorBSpline< StorageType >::operator=().
|
protected |
pointer to shape-space matrix object
Definition at line 1142 of file ContourDetectorBSpline.hh.
Referenced by BIAS::ContourDetectorBSpline< StorageType >::operator=().
|
protected |
pointer to invariant shape-space matrix object
Definition at line 1144 of file ContourDetectorBSpline.hh.
Referenced by BIAS::ContourDetectorBSpline< StorageType >::operator=().
|
protected |
vector of control points; first entries are x-coordinates; last entries are y-coordinates
Definition at line 1131 of file ContourDetectorBSpline.hh.
Referenced by BIAS::ContourDetectorBSpline< StorageType >::Cluster(), and BIAS::ContourDetectorBSpline< StorageType >::operator=().