47 #include <visp3/core/vpImagePoint.h> 51 #include <visp3/core/vpMatrix.h> 53 #ifndef DOXYGEN_SHOULD_SKIP_THIS 65 typedef struct vpBasisFunction {
114 std::vector<vpImagePoint> controlPoints;
116 std::vector<double> knots;
120 std::vector<vpImagePoint> crossingPoints;
132 inline unsigned int get_p()
const {
return p; }
143 for (
unsigned int i = 0; i < controlPoints.size(); i++)
144 list.push_back(*(&(controlPoints[0]) + i));
155 for (
unsigned int i = 0; i < knots.size(); i++)
156 list.push_back(*(&(knots[0]) + i));
168 for (
unsigned int i = 0; i < crossingPoints.size(); i++)
169 list.push_back(*(&(crossingPoints[0]) + i));
177 inline void set_p(
unsigned int degree) { this->p = degree; }
186 controlPoints.clear();
187 for (std::list<vpImagePoint>::const_iterator it = list.begin(); it != list.end(); ++it) {
188 controlPoints.push_back(*it);
200 for (std::list<double>::const_iterator it = list.begin(); it != list.end(); ++it) {
201 knots.push_back(*it);
213 crossingPoints.clear();
214 for (std::list<vpImagePoint>::const_iterator it = list.begin(); it != list.end(); ++it) {
215 crossingPoints.push_back(*it);
219 static unsigned int findSpan(
double l_u,
unsigned int l_p, std::vector<double> &l_knots);
220 unsigned int findSpan(
double u);
222 static vpBasisFunction *computeBasisFuns(
double l_u,
unsigned int l_i,
unsigned int l_p,
223 std::vector<double> &l_knots);
224 vpBasisFunction *computeBasisFuns(
double u);
226 static vpBasisFunction **computeDersBasisFuns(
double l_u,
unsigned int l_i,
unsigned int l_p,
unsigned int l_der,
227 std::vector<double> &l_knots);
228 vpBasisFunction **computeDersBasisFuns(
double u,
unsigned int der);
230 static vpImagePoint computeCurvePoint(
double l_u,
unsigned int l_i,
unsigned int l_p, std::vector<double> &l_knots,
231 std::vector<vpImagePoint> &l_controlPoints);
234 static vpImagePoint *computeCurveDers(
double l_u,
unsigned int l_i,
unsigned int l_p,
unsigned int l_der,
235 std::vector<double> &l_knots, std::vector<vpImagePoint> &l_controlPoints);
236 vpImagePoint *computeCurveDers(
double u,
unsigned int der);
void get_crossingPoints(std::list< vpImagePoint > &list) const
unsigned int get_p() const
void get_controlPoints(std::list< vpImagePoint > &list) const
void set_p(unsigned int degree)
void set_crossingPoints(const std::list< vpImagePoint > &list)
void set_controlPoints(const std::list< vpImagePoint > &list)
Class that provides tools to compute and manipulate a B-Spline curve.
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
void set_knots(const std::list< double > &list)
void get_knots(std::list< double > &list) const