36 #include <visp3/core/vpDisplay.h>
37 #include <visp3/core/vpException.h>
38 #include <visp3/core/vpHomogeneousMatrix.h>
39 #include <visp3/core/vpImageConvert.h>
40 #include <visp3/core/vpImageFilter.h>
41 #include <visp3/core/vpMatrix.h>
42 #include <visp3/core/vpPixelMeterConversion.h>
44 #include <visp3/visual_features/vpFeatureLuminance.h>
111 :
vpBasicFeature(f), Z(1), nbr(0), nbc(0), bord(10), pixInfo(nullptr), firstTimeIn(0), cam()
130 for (
unsigned int i = 0; i <
dim_s; i++)
228 for (
unsigned int m = 0; m < L.getRows(); m++) {
234 double Zinv = 1 /
pixInfo[m].Z;
239 L[m][2] = -(x * Ix + y * Iy) * Zinv;
240 L[m][3] = -Ix * x * y - (1 + y * y) * Iy;
241 L[m][4] = (1 + x * x) * Ix + Iy * x * y;
242 L[m][5] = Iy * x - Ix * y;
270 for (
unsigned int i = 0; i <
dim_s; i++) {
271 e[i] =
s[i] - s_star[i];
299 static int firsttime = 0;
301 if (firsttime == 0) {
315 const vpColor & ,
unsigned int )
const
317 static int firsttime = 0;
319 if (firsttime == 0) {
333 const vpColor & ,
unsigned int )
const
335 static int firsttime = 0;
337 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 functionalities.
error that can be emitted by ViSP classes.
@ dimensionError
Bad dimension.
Class that defines the image luminance visual feature.
unsigned int nbr
Number of rows.
vpFeatureLuminance * duplicate() const vp_override
void setCameraParameters(vpCameraParameters &_cam)
void display(const vpCameraParameters &cam, const vpImage< unsigned char > &I, const vpColor &color=vpColor::green, unsigned int thickness=1) const vp_override
virtual ~vpFeatureLuminance() vp_override
Destructor.
vpLuminance * pixInfo
Store the image (as a vector with intensity and gradient I, Ix, Iy)
void print(unsigned int select=FEATURE_ALL) const vp_override
vpColVector error(const vpBasicFeature &s_star, unsigned int select=FEATURE_ALL) vp_override
unsigned int nbc
Number of column.
unsigned int bord
Border size.
vpFeatureLuminance & operator=(const vpFeatureLuminance &f)
void buildFrom(vpImage< unsigned char > &I)
vpMatrix interaction(unsigned int select=FEATURE_ALL) vp_override
static double derivativeFilterX(const vpImage< ImageType > &I, unsigned int r, unsigned int c)
static double derivativeFilterY(const vpImage< ImageType > &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)