39 #ifndef vpFeatureSegment_H
40 #define vpFeatureSegment_H
47 #include <visp3/core/vpMatrix.h>
48 #include <visp3/core/vpPoint.h>
49 #include <visp3/core/vpRGBa.h>
50 #include <visp3/visual_features/vpBasicFeature.h>
51 #include <visp3/visual_features/vpFeatureException.h>
81 void buildFrom(
double x1,
double y1,
double Z1,
double x2,
double y2,
double Z2);
84 unsigned int thickness = 1)
const;
86 unsigned int thickness = 1)
const;
99 inline double getXc()
const {
return s[0]; }
107 inline double getYc()
const {
return s[1]; }
116 inline double getL()
const {
return s[2]; }
132 inline double getZ1()
const {
return Z1_; }
141 inline double getZ2()
const {
return Z2_; }
149 void print(
unsigned int select = FEATURE_ALL)
const;
156 static unsigned int selectXc();
157 static unsigned int selectYc();
158 static unsigned int selectL();
159 static unsigned int selectAlpha();
243 std::cout <<
"Z1 = " << Z1_ << std::endl;
248 if (fabs(Z1_) < 1e-6) {
250 std::cout <<
"Z1 = " << Z1_ << std::endl;
276 std::cout <<
"Z2 = " << Z2_ << std::endl;
281 if (fabs(Z2_) < 1e-6) {
283 std::cout <<
"Z2 = " << Z2_ << std::endl;
class that defines what is a visual feature
virtual vpColVector error(const vpBasicFeature &s_star, unsigned int select=FEATURE_ALL)
virtual vpMatrix interaction(unsigned int select=FEATURE_ALL)=0
Compute the interaction matrix from a subset of the possible features.
virtual void print(unsigned int select=FEATURE_ALL) const =0
Print the name of the feature.
virtual void display(const vpCameraParameters &cam, const vpImage< unsigned char > &I, const vpColor &color=vpColor::green, unsigned int thickness=1) const =0
virtual vpBasicFeature * duplicate() const =0
Generic class defining intrinsic camera parameters.
Implementation of column vector and the associated operations.
Class to define RGB colors available for display functionalities.
static const vpColor green
Error that can be emitted by the vpBasicFeature class and its derivates.
@ badInitializationError
Wrong feature initialization.
Class that defines a 2D segment visual features. This class allow to consider two sets of visual feat...
virtual ~vpFeatureSegment()
Destructor. Does nothing.
void setAlpha(double val)
void setNormalized(bool normalized)
Implementation of a matrix and operations on matrices.