3 #include <visp/vpMatrix.h>
4 #include <visp/vpHomogeneousMatrix.h>
5 #include <visp/vpDisplay.h>
6 #include <visp/vpPixelMeterConversion.h>
7 #include <visp/vpImageConvert.h>
8 #include <visp/vpImageFilter.h>
9 #include <visp/vpException.h>
11 #include <visp/vpFeatureLuminance.h>
71 : Z(1), nbr(0), nbc(0), bord(10), pixInfo(NULL), firstTimeIn(0), cam()
84 :
vpBasicFeature(f), Z(1), nbr(0), nbc(0), bord(10), pixInfo(NULL), firstTimeIn(0), cam()
103 for(
unsigned int i=0; i<
dim_s; i++)
170 for (
unsigned int j = bord ; j <
nbc-
bord; j++)
190 for (
unsigned int j = bord ; j <
nbc-
bord; j++)
220 double x,y,Ix,Iy,Zinv;
224 for(
unsigned int m = 0; m< L.
getRows(); m++)
236 L[m][2] = -(x*Ix+y*Iy)*Zinv;
237 L[m][3] = -Ix*x*y-(1+y*y)*Iy;
238 L[m][4] = (1+x*x)*Ix + Iy*x*y;
269 for (
unsigned int i =0 ; i <
dim_s ; i++)
271 e[i] =
s[i] - s_star[i] ;
307 static int firsttime =0 ;
331 static int firsttime =0 ;
353 static int firsttime =0 ;
Class that defines the luminance and gradient of a point.
Definition of the vpMatrix class.
virtual ~vpFeatureLuminance()
Destructor.
bool * flags
Ensure that all the parameters needed to compute the iteraction matrix are set.
void resize(const unsigned int nrows, const unsigned int ncols, const bool nullify=true)
vpLuminance * pixInfo
Store the image (as a vector with intensity and gradient I, Ix, Iy)
void print(const unsigned int select=FEATURE_ALL) const
unsigned int bord
Border size.
static double derivativeFilterY(const vpImage< T > &I, const unsigned int r, const unsigned int c)
void buildFrom(vpImage< unsigned char > &I)
Class to define colors available for display functionnalities.
void setCameraParameters(vpCameraParameters &_cam)
unsigned int dim_s
Dimension of the visual feature.
error that can be emited by ViSP classes.
static void convertPoint(const vpCameraParameters &cam, const double &u, const double &v, double &x, double &y)
Point coordinates conversion from pixel coordinates to normalized coordinates in meter...
unsigned int nbr
Number of rows.
class that defines what is a visual feature
vpFeatureLuminance * duplicate() const
void set_Z(const double Z)
Class that defines the image luminance visual feature.
vpMatrix interaction(const unsigned int select=FEATURE_ALL)
vpFeatureLuminance & operator=(const vpFeatureLuminance &f)
Generic class defining intrinsic camera parameters.
vpColVector error(const vpBasicFeature &s_star, const unsigned int select=FEATURE_ALL)
unsigned int nbc
Number of column.
Class that provides a data structure for the column vectors as well as a set of operations on these v...
void display(const vpCameraParameters &cam, const vpImage< unsigned char > &I, const vpColor &color=vpColor::green, unsigned int thickness=1) const
unsigned int getRows() const
Return the number of rows of the matrix.
static double derivativeFilterX(const vpImage< T > &I, const unsigned int r, const unsigned int c)
unsigned int nbParameters
Number of parameters needed to compute the interaction matrix.
vpColVector s
State of the visual feature.
void resize(const unsigned int i, const bool flagNullify=true)