39 #include <visp3/core/vpDisplay.h>
40 #include <visp3/core/vpException.h>
41 #include <visp3/core/vpHomogeneousMatrix.h>
42 #include <visp3/core/vpImageConvert.h>
43 #include <visp3/core/vpImageFilter.h>
44 #include <visp3/core/vpMatrix.h>
45 #include <visp3/core/vpPixelMeterConversion.h>
47 #include <visp3/visual_features/vpFeatureLuminance.h>
114 :
vpBasicFeature(f), Z(1), nbr(0), nbc(0), bord(10), pixInfo(NULL), firstTimeIn(0), cam()
133 for (
unsigned int i = 0; i <
dim_s; i++)
230 for (
unsigned int m = 0; m < L.getRows(); m++) {
236 double Zinv = 1 /
pixInfo[m].Z;
241 L[m][2] = -(x * Ix + y * Iy) * Zinv;
242 L[m][3] = -Ix * x * y - (1 + y * y) * Iy;
243 L[m][4] = (1 + x * x) * Ix + Iy * x * y;
244 L[m][5] = Iy * x - Ix * y;
272 for (
unsigned int i = 0; i <
dim_s; i++) {
273 e[i] =
s[i] - s_star[i];
301 static int firsttime = 0;
303 if (firsttime == 0) {
317 const vpColor & ,
unsigned int )
const
319 static int firsttime = 0;
321 if (firsttime == 0) {
335 const vpColor & ,
unsigned int )
const
337 static int firsttime = 0;
339 if (firsttime == 0) {
class that defines what is a visual feature
vpColVector s
State of the visual feature.
unsigned int nbParameters
Number of parameters needed to compute the interaction matrix.
unsigned int dim_s
Dimension of the visual feature.
Generic class defining intrinsic camera parameters.
Implementation of column vector and the associated operations.
void resize(unsigned int i, bool flagNullify=true)
Class to define RGB colors available for display functionnalities.
error that can be emited by ViSP classes.
@ dimensionError
Bad dimension.
Class that defines the image luminance visual feature.
unsigned int nbr
Number of rows.
void setCameraParameters(vpCameraParameters &_cam)
vpColVector error(const vpBasicFeature &s_star, unsigned int select=FEATURE_ALL)
vpLuminance * pixInfo
Store the image (as a vector with intensity and gradient I, Ix, Iy)
void display(const vpCameraParameters &cam, const vpImage< unsigned char > &I, const vpColor &color=vpColor::green, unsigned int thickness=1) const
unsigned int nbc
Number of column.
unsigned int bord
Border size.
virtual ~vpFeatureLuminance()
Destructor.
vpFeatureLuminance & operator=(const vpFeatureLuminance &f)
void buildFrom(vpImage< unsigned char > &I)
vpMatrix interaction(unsigned int select=FEATURE_ALL)
vpFeatureLuminance * duplicate() const
void print(unsigned int select=FEATURE_ALL) const
static double derivativeFilterY(const vpImage< T > &I, unsigned int r, unsigned int c)
static double derivativeFilterX(const vpImage< T > &I, unsigned int r, unsigned int c)
Implementation of a matrix and operations on matrices.
static void convertPoint(const vpCameraParameters &cam, const double &u, const double &v, double &x, double &y)