![]() |
Visual Servoing Platform
version 3.3.0
|
#include <vpMath.h>
Static Public Member Functions | |
static double | deg (double rad) |
static double | rad (double deg) |
static double | sqr (double x) |
static double | fact (unsigned int x) |
static long double | comb (unsigned int n, unsigned int p) |
static int | round (double x) |
static int() | sign (double x) |
static bool | nul (double x, double s=0.001) |
static bool | equal (double x, double y, double s=0.001) |
static bool | greater (double x, double y, double s=0.001) |
template<class Type > | |
static Type | maximum (const Type &a, const Type &b) |
template<class Type > | |
static Type | minimum (const Type &a, const Type &b) |
template<class Type > | |
static Type | abs (const Type &x) |
static double | sinc (double x) |
static double | sinc (double sinx, double x) |
static double | mcosc (double cosx, double x) |
static double | msinc (double sinx, double x) |
static double | sigmoid (double x, double x0=0., double x1=1., double n=12.) |
template<class Type > | |
static void | swap (Type &a, Type &b) |
static bool | isNaN (double value) |
static bool | isInf (double value) |
template<typename _Tp > | |
static _Tp | saturate (unsigned char v) |
template<typename _Tp > | |
static _Tp | saturate (char v) |
template<typename _Tp > | |
static _Tp | saturate (unsigned short v) |
template<typename _Tp > | |
static _Tp | saturate (short v) |
template<typename _Tp > | |
static _Tp | saturate (unsigned v) |
template<typename _Tp > | |
static _Tp | saturate (int v) |
template<typename _Tp > | |
static _Tp | saturate (float v) |
template<typename _Tp > | |
static _Tp | saturate (double v) |
static double | getMean (const std::vector< double > &v) |
static double | getMedian (const std::vector< double > &v) |
static double | getStdev (const std::vector< double > &v, bool useBesselCorrection=false) |
static int | modulo (int a, int n) |
template<> | |
unsigned char | saturate (char v) |
template<> | |
unsigned char | saturate (unsigned short v) |
template<> | |
unsigned char | saturate (int v) |
template<> | |
unsigned char | saturate (short v) |
template<> | |
unsigned char | saturate (unsigned int v) |
template<> | |
unsigned char | saturate (float v) |
template<> | |
unsigned char | saturate (double v) |
template<> | |
char | saturate (unsigned char v) |
template<> | |
char | saturate (unsigned short v) |
template<> | |
char | saturate (int v) |
template<> | |
char | saturate (short v) |
template<> | |
char | saturate (unsigned int v) |
template<> | |
char | saturate (float v) |
template<> | |
char | saturate (double v) |
template<> | |
unsigned short | saturate (char v) |
template<> | |
unsigned short | saturate (short v) |
template<> | |
unsigned short | saturate (int v) |
template<> | |
unsigned short | saturate (unsigned int v) |
template<> | |
unsigned short | saturate (float v) |
template<> | |
unsigned short | saturate (double v) |
template<> | |
short | saturate (unsigned short v) |
template<> | |
short | saturate (int v) |
template<> | |
short | saturate (unsigned int v) |
template<> | |
short | saturate (float v) |
template<> | |
short | saturate (double v) |
template<> | |
int | saturate (float v) |
template<> | |
int | saturate (double v) |
template<> | |
unsigned int | saturate (float v) |
template<> | |
unsigned int | saturate (double v) |
Provides simple mathematics computation tools that are not available in the C mathematics library (math.h)
|
inlinestatic |
Find the absolute value of a number (or other).
x | : The number. |
|
inlinestatic |
|
inlinestatic |
Convert an angle in radians into degrees.
rad | : Angle in radians. |
Definition at line 100 of file vpMath.h.
Referenced by vpMbEdgeMultiTracker::computeProjectionError(), vpMbGenericTracker::computeProjectionError(), vpMbDepthDenseTracker::loadConfigFile(), vpMbDepthNormalTracker::loadConfigFile(), vpSimulatorAfma6::savePosFile(), vpSimulatorAfma6::updateArticularPosition(), and vpRobotBiclops::vpRobotBiclopsSpeedControlLoop().
|
inlinestatic |
Compares to
.
x | : x value. |
y | : y value. |
s | : Tolerance threshold. |
Definition at line 295 of file vpMath.h.
Referenced by vpMbDepthDenseTracker::display(), vpMbDepthNormalTracker::display(), vpMbEdgeTracker::displayFeaturesOnImage(), vpRowVector::operator==(), and vpColVector::operator==().
|
inlinestatic |
|
static |
Compute the mean value for a vector of double.
v | : Vector of double values. |
Definition at line 201 of file vpMath.cpp.
|
static |
Compute the median value for a vector of double.
v | : Vector of double values. |
Definition at line 221 of file vpMath.cpp.
|
static |
Compute the standard deviation value for a vector of double.
v | : Vector of double values. |
useBesselCorrection | : If true, the Bessel correction is used (normalize by N-1). |
Definition at line 251 of file vpMath.cpp.
|
inlinestatic |
|
static |
Returns whether a double is an infinity value (either positive infinity or negative infinity).
value | : Double number to check. |
Definition at line 109 of file vpMath.cpp.
|
static |
Check whether a double number is not a number (NaN) or not.
value | : Double number to check. |
Definition at line 83 of file vpMath.cpp.
|
inlinestatic |
Find the maximum between two numbers (or other).
a | : First number. |
b | : Second number. |
Definition at line 142 of file vpMath.h.
Referenced by vpMbTracker::addProjectionErrorCircle(), vpMbTracker::addProjectionErrorCylinder(), vpSimulatorAfma6::getExternalImage(), vpSimulatorViper850::getExternalImage(), vpWireFrameSimulator::getExternalImage(), vpWireFrameSimulator::getInternalImage(), vpRobotWireFrameSimulator::getInternalView(), vpRansac< vpTransformation >::ransac(), vpMeNurbs::seekExtremitiesCanny(), and vpRobotBiclops::vpRobotBiclopsSpeedControlLoop().
|
static |
Compute
cosx | : Value of cos(x). |
x | : Value of x. |
Definition at line 134 of file vpMath.cpp.
|
inlinestatic |
Find the minimum between two numbers (or other).
a | : First number. |
b | : Second number. |
Definition at line 150 of file vpMath.h.
Referenced by vpSimulatorAfma6::getExternalImage(), vpSimulatorViper850::getExternalImage(), vpWireFrameSimulator::getExternalImage(), vpWireFrameSimulator::getInternalImage(), vpRobotWireFrameSimulator::getInternalView(), vpIoTools::loadConfigFile(), vpWireFrameSimulator::navigation(), and vpRansac< vpTransformation >::ransac().
|
static |
Compute the modified modulo:
a | : The dividend. |
n | : The divisor. |
Definition at line 285 of file vpMath.cpp.
|
static |
Compute with
.
sinx | : value of sin(x). |
x | : Value of x. |
Definition at line 152 of file vpMath.cpp.
|
inlinestatic |
Compares to
.
x | : Value to test. |
s | : Tolerance threshold |
Definition at line 286 of file vpMath.h.
Referenced by vpImageTools::warpImage().
|
inlinestatic |
Convert an angle in degrees into radian.
deg | : Angle in degrees. |
Definition at line 107 of file vpMath.h.
Referenced by vpMbTracker::addPolygon(), vpMbTracker::addProjectionErrorPolygon(), vpMbEdgeMultiTracker::computeProjectionError(), vpMbGenericTracker::computeProjectionError(), vpSimulatorAfma6::init(), vpSimulatorAfma6::initDisplay(), vpMbDepthDenseTracker::loadConfigFile(), vpMbDepthNormalTracker::loadConfigFile(), vpWireFrameSimulator::navigation(), vpSimulatorAfma6::readPosFile(), vpMbDepthDenseTracker::resetTracker(), vpMbDepthNormalTracker::resetTracker(), vpRobotBiclops::vpRobotBiclopsSpeedControlLoop(), and vpWireFrameSimulator::vpWireFrameSimulator().
|
inlinestatic |
Round x to the nearest integer.
x | : Value to round. |
Definition at line 240 of file vpMath.h.
Referenced by vpMeSite::convolution(), vpMeSite::getSign(), vpMeSite::init(), vpMeTracker::outOfImage(), saturate(), and vpMeSite::vpMeSite().
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Return the sign of x.
Definition at line 267 of file vpMath.h.
Referenced by vpMbEdgeTracker::computeVVSFirstPhase().
|
static |
Compute sinus cardinal .
sinx | : Value of sin(x). |
x | : Value of x. |
Definition at line 186 of file vpMath.cpp.
|
static |
Compute sinus cardinal .
x | : Value of x. |
Definition at line 169 of file vpMath.cpp.
|
inlinestatic |
Compute x square value.
Definition at line 113 of file vpMath.h.
Referenced by vpMbTracker::addPolygon(), vpMbTracker::addProjectionErrorPolygon(), vpMbDepthDenseTracker::computeVVS(), vpMbDepthNormalTracker::computeVVS(), vpMbEdgeKltMultiTracker::computeVVS(), vpMbEdgeMultiTracker::computeVVS(), vpMbGenericTracker::computeVVS(), vpMbEdgeTracker::computeVVSInit(), vpMbtFaceDepthNormal::estimateFeatures(), vpMeEllipse::initTracking(), vpScale::KernelDensityGradient(), vpScale::KernelDensityGradient_EPANECHNIKOV(), vpScale::MeanShift(), vpMeNurbs::seekExtremitiesCanny(), and vpImageTools::undistort().