40 #ifndef vpFeatureSegment_H
41 #define vpFeatureSegment_H
48 #include <visp3/core/vpMatrix.h>
49 #include <visp3/core/vpPoint.h>
50 #include <visp3/visual_features/vpBasicFeature.h>
51 #include <visp3/core/vpRGBa.h>
52 #include <visp3/visual_features/vpFeatureException.h>
81 void buildFrom(
const double x1,
const double y1,
const double Z1,
const double x2,
const double y2,
const double Z2);
86 unsigned int thickness=1)
const ;
90 unsigned int thickness=1)
const ;
96 const unsigned int select = FEATURE_ALL) ;
103 inline double getXc()
const {
return s[0] ; }
110 inline double getYc()
const {
return s[1] ; }
118 inline double getL()
const {
return s[2] ; }
133 inline double getZ1()
const {
return Z1_ ;}
141 inline double getZ2()
const {
return Z2_ ;}
149 void print(
const 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();
175 inline void setXc(
const double val){
187 inline void setYc(
const double val){
198 inline void setL(
const double val){
234 std::cout <<
"Z1 = " << Z1_ << std::endl ;
237 "Point Z1 is behind the camera ")) ;
240 if (fabs(Z1_) < 1e-6)
243 std::cout <<
"Z1 = " << Z1_ << std::endl ;
246 "Point Z1 coordinates is null")) ;
270 std::cout <<
"Z2 = " << Z2_ << std::endl ;
273 "Point Z2 is behind the camera ")) ;
276 if (fabs(Z2_) < 1e-6)
279 std::cout <<
"Z2 = " << Z2_ << std::endl ;
282 "Point Z2 coordinates is null")) ;
Implementation of a matrix and operations on matrices.
void setAlpha(const double val)
virtual void print(const unsigned int select=FEATURE_ALL) const =0
Print the name of the feature.
~vpFeatureSegment()
Destructor. Does nothing.
Class to define colors available for display functionnalities.
virtual vpColVector error(const vpBasicFeature &s_star, const unsigned int select=FEATURE_ALL)
Compute the error between two visual features from a subset of the possible features.
static const vpColor green
void setL(const double val)
void setZ1(const double val)
class that defines what is a visual feature
void setZ2(const double val)
Class that defines a 2D segment visual features. This class allow to consider two sets of visual feat...
Error that can be emited by the vpBasicFeature class and its derivates.
virtual vpMatrix interaction(const unsigned int select=FEATURE_ALL)=0
Compute the interaction matrix from a subset of the possible features.
Generic class defining intrinsic camera parameters.
void setYc(const double val)
void setNormalized(bool normalized)
Implementation of column vector and the associated operations.
virtual vpBasicFeature * duplicate() const =0
virtual void display(const vpCameraParameters &cam, const vpImage< unsigned char > &I, const vpColor &color=vpColor::green, unsigned int thickness=1) const =0
void setXc(const double val)