44 #ifndef vpFeatureSegment_H
45 #define vpFeatureSegment_H
52 #include <visp/vpMatrix.h>
53 #include <visp/vpPoint.h>
54 #include <visp/vpBasicFeature.h>
55 #include <visp/vpRGBa.h>
56 #include <visp/vpFeatureException.h>
85 void buildFrom(
const double x1,
const double y1,
const double Z1,
const double x2,
const double y2,
const double Z2);
90 unsigned int thickness=1)
const ;
94 unsigned int thickness=1)
const ;
100 const unsigned int select = FEATURE_ALL) ;
107 inline double getXc()
const {
return s[0] ; }
114 inline double getYc()
const {
return s[1] ; }
122 inline double getL()
const {
return s[2] ; }
137 inline double getZ1()
const {
return Z1_ ;}
145 inline double getZ2()
const {
return Z2_ ;}
153 void print(
const unsigned int select= FEATURE_ALL)
const ;
182 inline static unsigned int selectXc() {
return FEATURE_LINE[0] ; }
207 inline static unsigned int selectYc() {
return FEATURE_LINE[1] ; }
232 inline static unsigned int selectL() {
return FEATURE_LINE[2] ; }
257 inline static unsigned int selectAlpha() {
return FEATURE_LINE[3] ; }
273 inline void setXc(
const double val){
285 inline void setYc(
const double val){
296 inline void setL(
const double val){
332 std::cout <<
"Z1 = " << Z1_ << std::endl ;
335 "Point Z1 is behind the camera ")) ;
338 if (fabs(Z1_) < 1e-6)
341 std::cout <<
"Z1 = " << Z1_ << std::endl ;
344 "Point Z1 coordinates is null")) ;
368 std::cout <<
"Z2 = " << Z2_ << std::endl ;
371 "Point Z2 is behind the camera ")) ;
374 if (fabs(Z2_) < 1e-6)
377 std::cout <<
"Z2 = " << Z2_ << std::endl ;
380 "Point Z2 coordinates is null")) ;
Definition of the vpMatrix class.
bool * flags
Ensure that all the parameters needed to compute the iteraction matrix are set.
static unsigned int selectL()
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.
static unsigned int selectYc()
Class to define colors available for display functionnalities.
static unsigned int selectAlpha()
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)
Class that provides a data structure for the column vectors as well as a set of operations on these v...
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
static unsigned int selectXc()
void setXc(const double val)