 |
Visual Servoing Platform
version 3.2.0
|
40 #ifndef vpFeatureSegment_H
41 #define vpFeatureSegment_H
48 #include <visp3/core/vpMatrix.h>
49 #include <visp3/core/vpPoint.h>
50 #include <visp3/core/vpRGBa.h>
51 #include <visp3/visual_features/vpBasicFeature.h>
52 #include <visp3/visual_features/vpFeatureException.h>
82 void buildFrom(
const double x1,
const double y1,
const double Z1,
const double x2,
const double y2,
const double Z2);
85 unsigned int thickness = 1)
const;
87 unsigned int thickness = 1)
const;
100 inline double getXc()
const {
return s[0]; }
108 inline double getYc()
const {
return s[1]; }
117 inline double getL()
const {
return s[2]; }
125 inline double getAlpha()
const {
return s[3]; }
133 inline double getZ1()
const {
return Z1_; }
142 inline double getZ2()
const {
return Z2_; }
150 void print(
const unsigned int select = FEATURE_ALL)
const;
155 bool isNormalized() {
return normalized_; };
157 static unsigned int selectXc();
158 static unsigned int selectYc();
159 static unsigned int selectL();
160 static unsigned int selectAlpha();
168 void setNormalized(
bool normalized) { normalized_ = normalized; };
178 inline void setXc(
const double val)
192 inline void setYc(
const double val)
205 inline void setL(
const double val)
218 inline void setAlpha(
const double val)
238 inline void setZ1(
const double val)
244 std::cout <<
"Z1 = " << Z1_ << std::endl;
249 if (fabs(Z1_) < 1e-6) {
251 std::cout <<
"Z1 = " << Z1_ << std::endl;
271 inline void setZ2(
const double val)
277 std::cout <<
"Z2 = " << Z2_ << std::endl;
282 if (fabs(Z2_) < 1e-6) {
284 std::cout <<
"Z2 = " << Z2_ << std::endl;
virtual void display(const vpCameraParameters &cam, const vpImage< unsigned char > &I, const vpColor &color=vpColor::green, unsigned int thickness=1) const =0
Generic class defining intrinsic camera parameters.
Class that defines a 2D segment visual features. This class allow to consider two sets of visual feat...
virtual vpColVector error(const vpBasicFeature &s_star, const unsigned int select=FEATURE_ALL)
virtual vpMatrix interaction(const unsigned int select=FEATURE_ALL)=0
Compute the interaction matrix from a subset of the possible features.
Implementation of column vector and the associated operations.
Implementation of a matrix and operations on matrices.
static const vpColor green
Error that can be emited by the vpBasicFeature class and its derivates.
Class to define colors available for display functionnalities.
virtual vpBasicFeature * duplicate() const =0
class that defines what is a visual feature
virtual void print(const unsigned int select=FEATURE_ALL) const =0
Print the name of the feature.