41#include <visp3/core/vpDebug.h>
42#include <visp3/core/vpDisplay.h>
43#include <visp3/core/vpException.h>
44#include <visp3/core/vpHomogeneousMatrix.h>
45#include <visp3/core/vpImageConvert.h>
46#include <visp3/core/vpImageFilter.h>
47#include <visp3/core/vpMatrix.h>
48#include <visp3/core/vpPixelMeterConversion.h>
50#include <visp3/visual_features/vpFeatureLuminance.h>
105 if (
flags !=
nullptr) {
137 for (
unsigned int i = 0; i <
dim_s; i++)
186 double px =
cam.get_px();
187 double py =
cam.get_py();
209 for (
unsigned int i =
bord; i < (
nbr -
bord); ++i) {
210 for (
unsigned int j =
bord; j < (
nbc -
bord); ++j) {
234 for (
unsigned int m = 0; m < L.getRows(); m++) {
240 double Zinv = 1 /
pixInfo[m].Z;
245 L[m][2] = -(x * Ix + y * Iy) * Zinv;
246 L[m][3] = -Ix * x * y - (1 + y * y) * Iy;
247 L[m][4] = (1 + x * x) * Ix + Iy * x * y;
248 L[m][5] = Iy * x - Ix * y;
276 for (
unsigned int i = 0; i <
dim_s; i++) {
277 e[i] =
s[i] - s_star[i];
305 static int firsttime = 0;
307 if (firsttime == 0) {
321 const vpColor & ,
unsigned int )
const
323 static int firsttime = 0;
325 if (firsttime == 0) {
339 const vpColor & ,
unsigned int )
const
341 static int firsttime = 0;
343 if (firsttime == 0) {
void resize(unsigned int nrows, unsigned int ncols, bool flagNullify=true, bool recopy_=true)
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.
Class to define RGB colors available for display functionalities.
error that can be emitted by ViSP classes.
@ dimensionError
Bad dimension.
vpFeatureLuminance & buildFrom(vpImage< unsigned char > &I)
vpColVector error(const vpBasicFeature &s_star, unsigned int select=FEATURE_ALL) VP_OVERRIDE
vpMatrix interaction(unsigned int select=FEATURE_ALL) VP_OVERRIDE
unsigned int nbr
Number of rows.
static const int DEFAULT_BORDER
void print(unsigned int select=FEATURE_ALL) const VP_OVERRIDE
void setCameraParameters(const vpCameraParameters &_cam)
vpLuminance * pixInfo
Store the image (as a vector with intensity and gradient I, Ix, Iy).
vpFeatureLuminance * duplicate() const VP_OVERRIDE
virtual ~vpFeatureLuminance() VP_OVERRIDE
Destructor.
unsigned int getBorder() const
void display(const vpCameraParameters &cam, const vpImage< unsigned char > &I, const vpColor &color=vpColor::green, unsigned int thickness=1) const VP_OVERRIDE
unsigned int nbc
Number of column.
unsigned int bord
Border size.
vpFeatureLuminance & operator=(const vpFeatureLuminance &f)
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)
Definition of the vpImage class member functions.
Implementation of a matrix and operations on matrices.
static void convertPoint(const vpCameraParameters &cam, const double &u, const double &v, double &x, double &y)