39 #include <visp3/core/vpMatrix.h>
40 #include <visp3/core/vpHomogeneousMatrix.h>
41 #include <visp3/core/vpDisplay.h>
42 #include <visp3/core/vpPixelMeterConversion.h>
43 #include <visp3/core/vpImageConvert.h>
44 #include <visp3/core/vpImageFilter.h>
45 #include <visp3/core/vpException.h>
47 #include <visp3/visual_features/vpFeatureLuminance.h>
107 : Z(1), nbr(0), nbc(0), bord(10), pixInfo(NULL), firstTimeIn(0), cam()
120 :
vpBasicFeature(f), Z(1), nbr(0), nbc(0), bord(10), pixInfo(NULL), firstTimeIn(0), cam()
139 for(
unsigned int i=0; i<
dim_s; i++)
206 for (
unsigned int j = bord ; j <
nbc-
bord; j++)
226 for (
unsigned int j = bord ; j <
nbc-
bord; j++)
258 for(
unsigned int m = 0; m< L.
getRows(); m++)
265 double Zinv = 1 /
pixInfo[m].Z;
270 L[m][2] = -(x*Ix+y*Iy)*Zinv;
271 L[m][3] = -Ix*x*y-(1+y*y)*Iy;
272 L[m][4] = (1+x*x)*Ix + Iy*x*y;
303 for (
unsigned int i =0 ; i <
dim_s ; i++)
305 e[i] =
s[i] - s_star[i] ;
341 static int firsttime =0 ;
365 static int firsttime =0 ;
387 static int firsttime =0 ;
Implementation of a matrix and operations on matrices.
virtual ~vpFeatureLuminance()
Destructor.
bool * flags
Ensure that all the parameters needed to compute the iteraction matrix are set.
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.
void resize(const unsigned int nrows, const unsigned int ncols, const bool flagNullify=true)
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 getRows() const
Return the number of rows of the 2D array.
unsigned int nbc
Number of column.
Implementation of column vector and the associated operations.
void display(const vpCameraParameters &cam, const vpImage< unsigned char > &I, const vpColor &color=vpColor::green, unsigned int thickness=1) const
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)