42 #include <visp3/core/vpImagePoint.h>
46 #include <visp3/core/vpMatrix.h>
48 #ifndef DOXYGEN_SHOULD_SKIP_THIS
60 typedef struct vpBasisFunction
110 std::vector<vpImagePoint> controlPoints;
112 std::vector<double> knots;
116 std::vector<vpImagePoint> crossingPoints;
128 inline unsigned int get_p()
const {
return p; }
139 for (
unsigned int i = 0; i < controlPoints.size(); i++) {
140 list.push_back(*(&(controlPoints[0]) + i));
152 for (
unsigned int i = 0; i < knots.size(); i++) {
153 list.push_back(*(&(knots[0]) + i));
166 for (
unsigned int i = 0; i < crossingPoints.size(); i++) {
167 list.push_back(*(&(crossingPoints[0]) + i));
176 inline void set_p(
unsigned int degree) { this->p = degree; }
185 controlPoints.clear();
186 for (std::list<vpImagePoint>::const_iterator it = list.begin(); it != list.end(); ++it) {
187 controlPoints.push_back(*it);
199 for (std::list<double>::const_iterator it = list.begin(); it != list.end(); ++it) {
200 knots.push_back(*it);
212 crossingPoints.clear();
213 for (std::list<vpImagePoint>::const_iterator it = list.begin(); it != list.end(); ++it) {
214 crossingPoints.push_back(*it);
218 static unsigned int findSpan(
double l_u,
unsigned int l_p,
const std::vector<double> &l_knots);
219 unsigned int findSpan(
double u)
const;
221 static vpBasisFunction *computeBasisFuns(
double l_u,
unsigned int l_i,
unsigned int l_p,
222 const std::vector<double> &l_knots);
223 vpBasisFunction *computeBasisFuns(
double u)
const;
225 static vpBasisFunction **computeDersBasisFuns(
double l_u,
unsigned int l_i,
unsigned int l_p,
unsigned int l_der,
226 const std::vector<double> &l_knots);
227 vpBasisFunction **computeDersBasisFuns(
double u,
unsigned int der)
const;
229 static vpImagePoint computeCurvePoint(
double l_u,
unsigned int l_i,
unsigned int l_p,
const std::vector<double> &l_knots,
230 const std::vector<vpImagePoint> &l_controlPoints);
233 static vpImagePoint *computeCurveDers(
double l_u,
unsigned int l_i,
unsigned int l_p,
unsigned int l_der,
234 const std::vector<double> &l_knots,
const std::vector<vpImagePoint> &l_controlPoints);
235 vpImagePoint *computeCurveDers(
double u,
unsigned int der)
const;
Class that provides tools to compute and manipulate a B-Spline curve.
void get_controlPoints(std::list< vpImagePoint > &list) const
void set_p(unsigned int degree)
void set_crossingPoints(const std::list< vpImagePoint > &list)
unsigned int get_p() const
void get_crossingPoints(std::list< vpImagePoint > &list) const
void set_controlPoints(const std::list< vpImagePoint > &list)
void get_knots(std::list< double > &list) const
void set_knots(const std::list< double > &list)
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...