Blender V4.3
libmv Namespace Reference

Namespaces

namespace  euclidean_resection
 
namespace  homography
 
namespace  internal
 
namespace  panography
 
namespace  resection
 
namespace  two_view
 

Classes

struct  ApplyNukeIntrinsicsCostFunction
 
class  Array3D
 3D array (row, column, channel). More...
 
class  ArrayND
 A multidimensional array class. More...
 
class  BaseArray
 
class  BrownCameraIntrinsics
 
struct  BruteRegionTracker
 
struct  BundleEvaluation
 
class  CameraIntrinsics
 
struct  DetectOptions
 
class  DivisionCameraIntrinsics
 
class  Dogleg
 
struct  EstimateFundamentalOptions
 
struct  EstimateHomographyOptions
 
struct  EuclideanCamera
 
struct  EuclideanPoint
 
class  EuclideanReconstruction
 
struct  Feature
 
class  Homography2DNormalizedParameterization
 
class  Homography3DNormalizedParameterization
 
class  HybridRegionTracker
 
class  IdGenerator
 
class  Image
 
struct  KltRegionTracker
 
class  LevenbergMarquardt
 
struct  Marker
 
class  NukeCameraIntrinsics
 
class  NumericJacobian
 
struct  NViewDataSet
 
struct  nViewDatasetConfigator
 
class  PackedIntrinsics
 
class  PolynomialCameraIntrinsics
 
class  ProgressUpdateCallback
 
struct  ProjectiveCamera
 
struct  ProjectivePoint
 
class  ProjectiveReconstruction
 
class  PyramidRegionTracker
 
class  RegionTracker
 
class  RetrackRegionTracker
 
class  scoped_array
 
class  scoped_ptr
 
struct  TrackRegionOptions
 
struct  TrackRegionResult
 
class  Tracks
 
struct  TrkltRegionTracker
 
class  Tuple
 
struct  TwoViewDataSet
 
struct  UnnormalizerI
 Use inverse for unnormalize. More...
 
struct  UnnormalizerT
 Use transpose for unnormalize. More...
 

Typedefs

template<class ElementType >
using vector = std::vector<ElementType, Eigen::aligned_allocator<ElementType>>
 
typedef Array3D< unsigned char > Array3Du
 
typedef Array3D< unsigned intArray3Dui
 
typedef Array3D< intArray3Di
 
typedef Array3D< floatArray3Df
 
typedef Array3D< short > Array3Ds
 
typedef Array3Du ByteImage
 
typedef Array3Df FloatImage
 
typedef Array3Di IntImage
 
typedef Array3Ds ShortImage
 
typedef Eigen::MatrixXd Mat
 
typedef Eigen::VectorXd Vec
 
typedef Eigen::MatrixXf Matf
 
typedef Eigen::VectorXf Vecf
 
typedef Eigen::Matrix< unsigned int, Eigen::Dynamic, Eigen::Dynamic > Matu
 
typedef Eigen::Matrix< unsigned int, Eigen::Dynamic, 1 > Vecu
 
typedef Eigen::Matrix< unsigned int, 2, 1 > Vec2u
 
typedef Eigen::Matrix< double, 2, 2 > Mat2
 
typedef Eigen::Matrix< double, 2, 3 > Mat23
 
typedef Eigen::Matrix< double, 3, 3 > Mat3
 
typedef Eigen::Matrix< double, 3, 4 > Mat34
 
typedef Eigen::Matrix< double, 3, 5 > Mat35
 
typedef Eigen::Matrix< double, 4, 1 > Mat41
 
typedef Eigen::Matrix< double, 4, 3 > Mat43
 
typedef Eigen::Matrix< double, 4, 4 > Mat4
 
typedef Eigen::Matrix< double, 4, 6 > Mat46
 
typedef Eigen::Matrix< float, 2, 2 > Mat2f
 
typedef Eigen::Matrix< float, 2, 3 > Mat23f
 
typedef Eigen::Matrix< float, 3, 3 > Mat3f
 
typedef Eigen::Matrix< float, 3, 4 > Mat34f
 
typedef Eigen::Matrix< float, 3, 5 > Mat35f
 
typedef Eigen::Matrix< float, 4, 3 > Mat43f
 
typedef Eigen::Matrix< float, 4, 4 > Mat4f
 
typedef Eigen::Matrix< float, 4, 6 > Mat46f
 
typedef Eigen::Matrix< double, 3, 3, Eigen::RowMajor > RMat3
 
typedef Eigen::Matrix< double, 4, 4, Eigen::RowMajor > RMat4
 
typedef Eigen::Matrix< double, 2, Eigen::Dynamic > Mat2X
 
typedef Eigen::Matrix< double, 3, Eigen::Dynamic > Mat3X
 
typedef Eigen::Matrix< double, 4, Eigen::Dynamic > Mat4X
 
typedef Eigen::Matrix< double, Eigen::Dynamic, 2 > MatX2
 
typedef Eigen::Matrix< double, Eigen::Dynamic, 3 > MatX3
 
typedef Eigen::Matrix< double, Eigen::Dynamic, 4 > MatX4
 
typedef Eigen::Matrix< double, Eigen::Dynamic, 5 > MatX5
 
typedef Eigen::Matrix< double, Eigen::Dynamic, 6 > MatX6
 
typedef Eigen::Matrix< double, Eigen::Dynamic, 7 > MatX7
 
typedef Eigen::Matrix< double, Eigen::Dynamic, 8 > MatX8
 
typedef Eigen::Matrix< double, Eigen::Dynamic, 9 > MatX9
 
typedef Eigen::Matrix< double, Eigen::Dynamic, 15 > MatX15
 
typedef Eigen::Matrix< double, Eigen::Dynamic, 16 > MatX16
 
typedef Eigen::Vector2d Vec2
 
typedef Eigen::Vector3d Vec3
 
typedef Eigen::Vector4d Vec4
 
typedef Eigen::Matrix< double, 5, 1 > Vec5
 
typedef Eigen::Matrix< double, 6, 1 > Vec6
 
typedef Eigen::Matrix< double, 7, 1 > Vec7
 
typedef Eigen::Matrix< double, 8, 1 > Vec8
 
typedef Eigen::Matrix< double, 9, 1 > Vec9
 
typedef Eigen::Matrix< double, 10, 1 > Vec10
 
typedef Eigen::Matrix< double, 11, 1 > Vec11
 
typedef Eigen::Matrix< double, 12, 1 > Vec12
 
typedef Eigen::Matrix< double, 13, 1 > Vec13
 
typedef Eigen::Matrix< double, 14, 1 > Vec14
 
typedef Eigen::Matrix< double, 15, 1 > Vec15
 
typedef Eigen::Matrix< double, 16, 1 > Vec16
 
typedef Eigen::Matrix< double, 17, 1 > Vec17
 
typedef Eigen::Matrix< double, 18, 1 > Vec18
 
typedef Eigen::Matrix< double, 19, 1 > Vec19
 
typedef Eigen::Matrix< double, 20, 1 > Vec20
 
typedef Eigen::Vector2f Vec2f
 
typedef Eigen::Vector3f Vec3f
 
typedef Eigen::Vector4f Vec4f
 
typedef Eigen::VectorXi VecXi
 
typedef Eigen::Vector2i Vec2i
 
typedef Eigen::Vector3i Vec3i
 
typedef Eigen::Vector4i Vec4i
 
typedef Eigen::Matrix< float, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > RMatf
 
typedef Eigen::NumTraits< doubleEigenDouble
 
typedef unsigned char ubyte
 

Enumerations

enum  NumericJacobianMode { CENTRAL , FORWARD }
 
enum  BundleIntrinsics {
  BUNDLE_NO_INTRINSICS = 0 , BUNDLE_FOCAL_LENGTH = (1 << 0) , BUNDLE_PRINCIPAL_POINT = (1 << 1) , BUNDLE_RADIAL_K1 = (1 << 2) ,
  BUNDLE_RADIAL_K2 = (1 << 3) , BUNDLE_RADIAL_K3 = (1 << 4) , BUNDLE_RADIAL_K4 = (1 << 5) , BUNDLE_RADIAL ,
  BUNDLE_TANGENTIAL_P1 = (1 << 6) , BUNDLE_TANGENTIAL_P2 = (1 << 7) , BUNDLE_TANGENTIAL = (BUNDLE_TANGENTIAL_P1 | BUNDLE_TANGENTIAL_P2)
}
 
enum  BundleConstraints { BUNDLE_NO_CONSTRAINTS = 0 , BUNDLE_NO_TRANSLATION = 1 }
 
enum  DistortionModelType { DISTORTION_MODEL_POLYNOMIAL , DISTORTION_MODEL_DIVISION , DISTORTION_MODEL_NUKE , DISTORTION_MODEL_BROWN }
 

Functions

void * aligned_malloc (int size, int alignment)
 
void aligned_free (void *ptr)
 
void FloatArrayToScaledByteArray (const Array3Df &float_array, Array3Du *byte_array, bool automatic_range_detection)
 
void ByteArrayToScaledFloatArray (const Array3Du &byte_array, Array3Df *float_array)
 Convert a byte array into a float array by dividing values by 255.
 
void SplitChannels (const Array3Df &input, Array3Df *channel0, Array3Df *channel1, Array3Df *channel2)
 
void PrintArray (const Array3Df &array)
 
template<typename AArrayType , typename BArrayType , typename CArrayType >
void MultiplyElements (const AArrayType &a, const BArrayType &b, CArrayType *c)
 
template<typename TA , typename TB , typename TC >
void MultiplyElements (const ArrayND< TA, 3 > &a, const ArrayND< TB, 3 > &b, ArrayND< TC, 3 > *c)
 
template<typename TA , typename TB , typename TC >
void MultiplyElements (const Array3D< TA > &a, const Array3D< TB > &b, Array3D< TC > *c)
 
void ComputeGaussianKernel (double sigma, Vec *kernel, Vec *derivative)
 
template<int size, bool vertical>
void FastConvolve (const Vec &kernel, int width, int height, const float *src, int src_stride, int src_line_stride, float *dst, int dst_stride)
 
template<bool vertical>
void Convolve (const Array3Df &in, const Vec &kernel, Array3Df *out_pointer, int plane)
 
void ConvolveHorizontal (const Array3Df &in, const Vec &kernel, Array3Df *out_pointer, int plane)
 
void ConvolveVertical (const Array3Df &in, const Vec &kernel, Array3Df *out_pointer, int plane)
 
void ConvolveGaussian (const Array3Df &in, double sigma, Array3Df *out_pointer)
 
void ImageDerivatives (const Array3Df &in, double sigma, Array3Df *gradient_x, Array3Df *gradient_y)
 
void BlurredImageAndDerivatives (const Array3Df &in, double sigma, Array3Df *blurred_image, Array3Df *gradient_x, Array3Df *gradient_y)
 
void BlurredImageAndDerivativesChannels (const Array3Df &in, double sigma, Array3Df *blurred_and_gradxy)
 
void BoxFilterHorizontal (const Array3Df &in, int window_size, Array3Df *out_pointer)
 
void BoxFilterVertical (const Array3Df &in, int window_size, Array3Df *out_pointer)
 
void BoxFilter (const Array3Df &in, int box_width, Array3Df *out)
 
void LaplaceFilter (unsigned char *src, unsigned char *dst, int width, int height, int strength)
 
double Gaussian (double x, double sigma)
 
double Gaussian2D (double x, double y, double sigma)
 
double GaussianDerivative (double x, double sigma)
 
double GaussianInversePositive (double y, double sigma)
 
double PearsonProductMomentCorrelation (const FloatImage &image_and_gradient1_sampled, const FloatImage &image_and_gradient2_sampled)
 
template<typename T >
T RGB2GRAY (const T r, const T g, const T b)
 
template<class ImageIn , class ImageOut >
void Rgb2Gray (const ImageIn &imaIn, ImageOut *imaOut)
 
template<class Image >
unsigned char * FloatImageToUCharArray (const Image &image)
 
template<class Image , class Color >
void safePutPixel (int yc, int xc, const Color &col, Image *pim)
 
template<class Image , class Color >
void safePutPixel (int yc, int xc, const Color *col, Image *pim)
 
template<class Image , class Color >
void DrawEllipse (int xc, int yc, int radiusA, int radiusB, const Color &col, Image *pim, double angle=0.0)
 
template<class Image , class Color >
void DrawCircle (int x, int y, int radius, const Color &col, Image *pim)
 
template<class Image , class Color >
void DrawLine (int xa, int ya, int xb, int yb, const Color &col, Image *pim)
 
template<typename T >
T SampleNearest (const Array3D< T > &image, float y, float x, int v=0)
 Nearest neighbor interpolation.
 
void LinearInitAxis (float x, int size, int *x1, int *x2, float *dx)
 
template<typename T >
T SampleLinear (const Array3D< T > &image, float y, float x, int v=0)
 Linear interpolation.
 
template<typename T >
void SampleLinear (const Array3D< T > &image, float y, float x, T *sample)
 
void DownsampleChannelsBy2 (const Array3Df &in, Array3Df *out)
 
void SamplePattern (const FloatImage &image, double x, double y, int half_width, int channels, FloatImage *sampled)
 
void PreconditionerFromPoints (const Mat &points, Mat3 *T)
 
void IsotropicPreconditionerFromPoints (const Mat &points, Mat3 *T)
 
void ApplyTransformationToPoints (const Mat &points, const Mat3 &T, Mat *transformed_points)
 
void NormalizePoints (const Mat &points, Mat *normalized_points, Mat3 *T)
 
void NormalizeIsotropicPoints (const Mat &points, Mat *normalized_points, Mat3 *T)
 
static void EliminateRow (const Mat34 &P, int row, Mat *X)
 
void ProjectionsFromFundamental (const Mat3 &F, Mat34 *P1, Mat34 *P2)
 
void FundamentalFromProjections (const Mat34 &P1, const Mat34 &P2, Mat3 *F)
 
static double EightPointSolver (const Mat &x1, const Mat &x2, Mat3 *F)
 
void EnforceFundamentalRank2Constraint (Mat3 *F)
 
double NormalizedEightPointSolver (const Mat &x1, const Mat &x2, Mat3 *F)
 
double FundamentalFrom7CorrespondencesLinear (const Mat &x1, const Mat &x2, std::vector< Mat3 > *F)
 
double FundamentalFromCorrespondences7Point (const Mat &x1, const Mat &x2, std::vector< Mat3 > *F)
 
void NormalizeFundamental (const Mat3 &F, Mat3 *F_normalized)
 
double SampsonDistance (const Mat &F, const Vec2 &x1, const Vec2 &x2)
 
double SymmetricEpipolarDistance (const Mat &F, const Vec2 &x1, const Vec2 &x2)
 
void EssentialFromFundamental (const Mat3 &F, const Mat3 &K1, const Mat3 &K2, Mat3 *E)
 
void FundamentalFromEssential (const Mat3 &E, const Mat3 &K1, const Mat3 &K2, Mat3 *F)
 
void RelativeCameraMotion (const Mat3 &R1, const Vec3 &t1, const Mat3 &R2, const Vec3 &t2, Mat3 *R, Vec3 *t)
 
void EssentialFromRt (const Mat3 &R1, const Vec3 &t1, const Mat3 &R2, const Vec3 &t2, Mat3 *E)
 
void MotionFromEssential (const Mat3 &E, std::vector< Mat3 > *Rs, std::vector< Vec3 > *ts)
 
int MotionFromEssentialChooseSolution (const std::vector< Mat3 > &Rs, const std::vector< Vec3 > &ts, const Mat3 &K1, const Vec2 &x1, const Mat3 &K2, const Vec2 &x2)
 
bool MotionFromEssentialAndCorrespondence (const Mat3 &E, const Mat3 &K1, const Vec2 &x1, const Mat3 &K2, const Vec2 &x2, Mat3 *R, Vec3 *t)
 
void FundamentalToEssential (const Mat3 &F, Mat3 *E)
 
bool EstimateFundamentalFromCorrespondences (const Mat &x1, const Mat &x2, const EstimateFundamentalOptions &options, Mat3 *F)
 
static bool Homography2DFromCorrespondencesLinearEuc (const Mat &x1, const Mat &x2, Mat3 *H, double expected_precision)
 
bool Homography2DFromCorrespondencesLinear (const Mat &x1, const Mat &x2, Mat3 *H, double expected_precision)
 
bool EstimateHomography2DFromCorrespondences (const Mat &x1, const Mat &x2, const EstimateHomographyOptions &options, Mat3 *H)
 
bool Homography3DFromCorrespondencesLinear (const Mat &x1, const Mat &x2, Mat4 *H, double expected_precision)
 
double SymmetricGeometricDistance (const Mat3 &H, const Vec2 &x1, const Vec2 &x2)
 
template<typename T >
void NViewTriangulate (const Matrix< T, 2, Dynamic > &x, const vector< Matrix< T, 3, 4 > > &Ps, Matrix< T, 4, 1 > *X)
 
template<typename T >
void NViewTriangulateAlgebraic (const Matrix< T, 2, Dynamic > &x, const vector< Matrix< T, 3, 4 > > &Ps, Matrix< T, 4, 1 > *X)
 
static bool Build_Minimal2Point_PolynomialFactor (const Mat &x1, const Mat &x2, double *P)
 
void F_FromCorrespondance_2points (const Mat &x1, const Mat &x2, vector< double > *fs)
 
void GetR_FixedCameraCenter (const Mat &x1, const Mat &x2, const double focal, Mat3 *R)
 
void P_From_KRt (const Mat3 &K, const Mat3 &R, const Vec3 &t, Mat34 *P)
 
void KRt_From_P (const Mat34 &P, Mat3 *Kp, Mat3 *Rp, Vec3 *tp)
 
void ProjectionShiftPrincipalPoint (const Mat34 &P, const Vec2 &principal_point, const Vec2 &principal_point_new, Mat34 *P_new)
 
void ProjectionChangeAspectRatio (const Mat34 &P, const Vec2 &principal_point, double aspect_ratio, double aspect_ratio_new, Mat34 *P_new)
 
void HomogeneousToEuclidean (const Mat &H, Mat *X)
 
void HomogeneousToEuclidean (const Mat3X &h, Mat2X *e)
 
void HomogeneousToEuclidean (const Mat4X &h, Mat3X *e)
 
void HomogeneousToEuclidean (const Vec3 &H, Vec2 *X)
 
void HomogeneousToEuclidean (const Vec4 &H, Vec3 *X)
 
void EuclideanToHomogeneous (const Mat &X, Mat *H)
 
void EuclideanToHomogeneous (const Vec2 &X, Vec3 *H)
 
void EuclideanToHomogeneous (const Vec3 &X, Vec4 *H)
 
void EuclideanToNormalizedCamera (const Mat2X &x, const Mat3 &K, Mat2X *n)
 
void HomogeneousToNormalizedCamera (const Mat3X &x, const Mat3 &K, Mat2X *n)
 
double Depth (const Mat3 &R, const Vec3 &t, const Vec3 &X)
 
double Depth (const Mat3 &R, const Vec3 &t, const Vec4 &X)
 
Vec2 HomogeneousToEuclidean (const Vec3 &h)
 
Vec3 HomogeneousToEuclidean (const Vec4 &h)
 
Mat2X HomogeneousToEuclidean (const Mat3X &h)
 
Mat3X EuclideanToHomogeneous (const Mat2X &x)
 
void EuclideanToHomogeneous (const Mat2X &x, Mat3X *h)
 
Mat4X EuclideanToHomogeneous (const Mat3X &x)
 
void EuclideanToHomogeneous (const Mat3X &x, Mat4X *h)
 
Vec3 EuclideanToHomogeneous (const Vec2 &x)
 
Vec4 EuclideanToHomogeneous (const Vec3 &x)
 
Vec2 Project (const Mat34 &P, const Vec3 &X)
 
void Project (const Mat34 &P, const Vec4 &X, Vec3 *x)
 
void Project (const Mat34 &P, const Vec4 &X, Vec2 *x)
 
void Project (const Mat34 &P, const Vec3 &X, Vec3 *x)
 
void Project (const Mat34 &P, const Vec3 &X, Vec2 *x)
 
void Project (const Mat34 &P, const Mat4X &X, Mat2X *x)
 
Mat2X Project (const Mat34 &P, const Mat4X &X)
 
void Project (const Mat34 &P, const Mat3X &X, Mat2X *x)
 
void Project (const Mat34 &P, const Mat3X &X, const Vecu &ids, Mat2X *x)
 
Mat2X Project (const Mat34 &P, const Mat3X &X)
 
Mat2X Project (const Mat34 &P, const Mat3X &X, const Vecu &ids)
 
bool isInFrontOfCamera (const Mat34 &P, const Vec4 &X)
 
bool isInFrontOfCamera (const Mat34 &P, const Vec3 &X)
 
Vec2 ImageToNormImageCoordinates (Mat3 &Kinverse, Vec2 &x)
 
double RootMeanSquareError (const Mat2X &x_image, const Mat4X &X_world, const Mat34 &P)
 Estimates the root mean square error (2D)
 
double RootMeanSquareError (const Mat2X &x_image, const Mat3X &X_world, const Mat3 &K, const Mat3 &R, const Vec3 &t)
 Estimates the root mean square error (2D)
 
TwoViewDataSet TwoRealisticCameras (bool same_K)
 
NViewDataSet NRealisticCamerasFull (int nviews, int npoints, const nViewDatasetConfigator config)
 
NViewDataSet NRealisticCamerasSparse (int nviews, int npoints, float view_ratio, unsigned min_projections, const nViewDatasetConfigator config)
 
void TriangulateDLT (const Mat34 &P1, const Vec2 &x1, const Mat34 &P2, const Vec2 &x2, Vec4 *X_homogeneous)
 
void TriangulateDLT (const Mat34 &P1, const Vec2 &x1, const Mat34 &P2, const Vec2 &x2, Vec3 *X_euclidean)
 
template<typename Function , typename Jacobian >
bool CheckJacobian (const Function &f, const typename Function::XMatrixType &x)
 
Mat3 RotationAroundX (double angle)
 
Mat3 RotationAroundY (double angle)
 
Mat3 RotationAroundZ (double angle)
 
Mat3 RotationRodrigues (const Vec3 &axis)
 
Mat3 LookAt (Vec3 center)
 
Mat3 CrossProductMatrix (const Vec3 &x)
 
void MeanAndVarianceAlongRows (const Mat &A, Vec *mean_pointer, Vec *variance_pointer)
 
void HorizontalStack (const Mat &left, const Mat &right, Mat *stacked)
 
void MatrixColumn (const Mat &A, int i, Vec2 *v)
 
void MatrixColumn (const Mat &A, int i, Vec3 *v)
 
void MatrixColumn (const Mat &A, int i, Vec4 *v)
 
template<typename TMat , typename TVec >
void SVD (TMat *, Vec *, Mat *, Mat *)
 
template<typename TMat , typename TVec >
double Nullspace (TMat *A, TVec *nullspace)
 
template<typename TMat , typename TVec1 , typename TVec2 >
double Nullspace2 (TMat *A, TVec1 *x1, TVec2 *x2)
 
template<class TA >
void TransposeInPlace (TA *A)
 
template<typename TVec >
double NormL1 (const TVec &x)
 
template<typename TVec >
double NormL2 (const TVec &x)
 
template<typename TVec >
double NormLInfinity (const TVec &x)
 
template<typename TVec >
double DistanceL1 (const TVec &x, const TVec &y)
 
template<typename TVec >
double DistanceL2 (const TVec &x, const TVec &y)
 
template<typename TVec >
double DistanceLInfinity (const TVec &x, const TVec &y)
 
template<typename TVec >
double NormalizeL1 (TVec *x)
 
template<typename TVec >
double NormalizeL2 (TVec *x)
 
template<typename TVec >
double NormalizeLInfinity (TVec *x)
 
template<typename T >
T Square (T x)
 
template<typename TVec >
Mat Diag (const TVec &x)
 
template<typename TMat >
double FrobeniusNorm (const TMat &A)
 
template<typename TMat >
double FrobeniusDistance (const TMat &A, const TMat &B)
 
Vec3 CrossProduct (const Vec3 &x, const Vec3 &y)
 
template<typename T , int RowsLeft, int RowsRight, int ColsLeft, int ColsRight>
Eigen::Matrix< T, ROWS, COLSHStack (const Eigen::Matrix< T, RowsLeft, ColsLeft > &left, const Eigen::Matrix< T, RowsRight, ColsRight > &right)
 
template<typename T , int RowsLeft, int RowsRight, int ColsLeft, int ColsRight>
Eigen::Matrix< T, COLS, ROWSVStack (const Eigen::Matrix< T, ColsLeft, RowsLeft > &top, const Eigen::Matrix< T, ColsRight, RowsRight > &bottom)
 
template<typename TTop , typename TBot , typename TStacked >
void VerticalStack (const TTop &top, const TBot &bottom, TStacked *stacked)
 
template<typename TMat , typename TCols >
TMat ExtractColumns (const TMat &A, const TCols &columns)
 
template<typename TMat , typename TDest >
void reshape (const TMat &a, int rows, int cols, TDest *b)
 
bool isnan (double i)
 
template<typename FloatType >
FloatType ceil0 (const FloatType &value)
 
Mat3 SkewMat (const Vec3 &x)
 Returns the skew anti-symmetric matrix of a vector.
 
Mat23 SkewMatMinimal (const Vec2 &x)
 
Mat3 RotationFromEulerVector (Vec3 euler_vector)
 Returns the rotaiton matrix built from given vector of euler angles.
 
template<typename Real >
int SolveCubicPolynomial (Real a, Real b, Real c, Real *x0, Real *x1, Real *x2)
 
template<typename Real >
int SolveCubicPolynomial (const Real *coeffs, Real *solutions)
 
void EuclideanBundle (const Tracks &tracks, EuclideanReconstruction *reconstruction)
 
void EuclideanBundleCommonIntrinsics (const Tracks &tracks, const int bundle_intrinsics, const int bundle_constraints, EuclideanReconstruction *reconstruction, CameraIntrinsics *intrinsics, BundleEvaluation *evaluation)
 
void ProjectiveBundle (const Tracks &, ProjectiveReconstruction *)
 
std::ostream & operator<< (std::ostream &os, const CameraIntrinsics &intrinsics)
 A human-readable representation of the camera intrinsic parameters.
 
 TEST (PolynomialCameraIntrinsics2, ApplyOnFocalCenter)
 
 TEST (PolynomialCameraIntrinsics, InvertOnFocalCenter)
 
 TEST (PolynomialCameraIntrinsics, ApplyIntrinsics)
 
 TEST (PolynomialCameraIntrinsics, InvertIntrinsics)
 
 TEST (PolynomialCameraIntrinsics, ApplyIsInvertibleSimple)
 
 TEST (PolynomialCameraIntrinsics, IdentityDistortBuffer)
 
 TEST (PolynomialCameraIntrinsics, IdentityUndistortBuffer)
 
void Detect (const FloatImage &image, const DetectOptions &options, vector< Feature > *detected_features)
 
std::ostream & operator<< (std::ostream &os, const Feature &feature)
 
 TEST (Detect, FASTSinglePointTest)
 
 TEST (Detect, HarrisSinglePointTest)
 
 TEST (Detect, HarrisSingleTriangleTest)
 
void InvertPolynomialDistortionModel (const double focal_length_x, const double focal_length_y, const double principal_point_x, const double principal_point_y, const double k1, const double k2, const double k3, const double p1, const double p2, const double image_x, const double image_y, double *normalized_x, double *normalized_y)
 
void InvertDivisionDistortionModel (const double focal_length_x, const double focal_length_y, const double principal_point_x, const double principal_point_y, const double k1, const double k2, const double image_x, const double image_y, double *normalized_x, double *normalized_y)
 
void InvertBrownDistortionModel (const double focal_length_x, const double focal_length_y, const double principal_point_x, const double principal_point_y, const double k1, const double k2, const double k3, const double k4, const double p1, const double p2, const double image_x, const double image_y, double *normalized_x, double *normalized_y)
 
void ApplyNukeDistortionModel (const double focal_length_x, const double focal_length_y, const double principal_point_x, const double principal_point_y, const int image_width, const int image_height, const double k1, const double k2, const double normalized_x, const double normalized_y, double *image_x, double *image_y)
 
template<typename T >
void ApplyPolynomialDistortionModel (const T &focal_length_x, const T &focal_length_y, const T &principal_point_x, const T &principal_point_y, const T &k1, const T &k2, const T &k3, const T &p1, const T &p2, const T &normalized_x, const T &normalized_y, T *image_x, T *image_y)
 
template<typename T >
void ApplyDivisionDistortionModel (const T &focal_length_x, const T &focal_length_y, const T &principal_point_x, const T &principal_point_y, const T &k1, const T &k2, const T &normalized_x, const T &normalized_y, T *image_x, T *image_y)
 
template<typename T >
void InvertNukeDistortionModel (const T &focal_length_x, const T &focal_length_y, const T &principal_point_x, const T &principal_point_y, const int image_width, const int image_height, const T &k1, const T &k2, const T &image_x, const T &image_y, T *normalized_x, T *normalized_y)
 
template<typename T >
void ApplyBrownDistortionModel (const T &focal_length_x, const T &focal_length_y, const T &principal_point_x, const T &principal_point_y, const T &k1, const T &k2, const T &k3, const T &k4, const T &p1, const T &p2, const T &normalized_x, const T &normalized_y, T *image_x, T *image_y)
 
bool EuclideanReconstructTwoFrames (const vector< Marker > &markers, EuclideanReconstruction *reconstruction)
 
bool ProjectiveReconstructTwoFrames (const vector< Marker > &markers, ProjectiveReconstruction *reconstruction)
 
bool EuclideanIntersect (const vector< Marker > &markers, EuclideanReconstruction *reconstruction)
 
bool ProjectiveIntersect (const vector< Marker > &markers, ProjectiveReconstruction *reconstruction)
 
 TEST (Intersect, EuclideanIntersect)
 
void SelectKeyframesBasedOnGRICAndVariance (const Tracks &_tracks, const CameraIntrinsics &intrinsics, vector< int > &keyframes)
 
 TEST (KeyframeSelection, SyntheticNeighborFrame)
 
 TEST (KeyframeSelection, FabrikEingangNeighborFrames)
 
 TEST (KeyframeSelection, FabrikEingangFarFrames)
 
 TEST (KeyframeSelection, CopterManualKeyFrames)
 
 TEST (KeyframeSelection, ElevatorManualKeyframesFrames)
 
 TEST (KeyframeSelection, ElevatorReconstructionVarianceTest)
 
void ModalSolver (const Tracks &tracks, EuclideanReconstruction *reconstruction, ProgressUpdateCallback *update_callback)
 
 TEST (ModalSolver, SyntheticCubeSceneMotion)
 
static void CompleteReconstructionLogProgress (ProgressUpdateCallback *update_callback, double progress, const char *step=NULL)
 
template<typename PipelineRoutines >
void InternalCompleteReconstruction (const Tracks &tracks, typename PipelineRoutines::Reconstruction *reconstruction, ProgressUpdateCallback *update_callback=NULL)
 
template<typename PipelineRoutines >
double InternalReprojectionError (const Tracks &image_tracks, const typename PipelineRoutines::Reconstruction &reconstruction, const CameraIntrinsics &intrinsics)
 
double EuclideanReprojectionError (const Tracks &image_tracks, const EuclideanReconstruction &reconstruction, const CameraIntrinsics &intrinsics)
 
double ProjectiveReprojectionError (const Tracks &image_tracks, const ProjectiveReconstruction &reconstruction, const CameraIntrinsics &intrinsics)
 
void EuclideanCompleteReconstruction (const Tracks &tracks, EuclideanReconstruction *reconstruction, ProgressUpdateCallback *update_callback)
 
void ProjectiveCompleteReconstruction (const Tracks &tracks, ProjectiveReconstruction *reconstruction)
 
void InvertIntrinsicsForTracks (const Tracks &raw_tracks, const CameraIntrinsics &camera_intrinsics, Tracks *calibrated_tracks)
 
void EuclideanScaleToUnity (EuclideanReconstruction *reconstruction)
 
bool EuclideanResect (const vector< Marker > &markers, EuclideanReconstruction *reconstruction, bool final_pass)
 
bool ProjectiveResect (const vector< Marker > &markers, ProjectiveReconstruction *reconstruction)
 
void CoordinatesForMarkersInImage (const vector< Marker > &markers, int image, Mat *coordinates)
 
static void ComputeTrackingEquation (const Array3Df &image_and_gradient1, const Array3Df &image_and_gradient2, double x1, double y1, double x2, double y2, int half_width, float *gxx, float *gxy, float *gyy, float *ex, float *ey)
 
static bool RegionIsInBounds (const FloatImage &image1, double x, double y, int half_window_size)
 
static void MakePyramid (const FloatImage &image, int num_levels, std::vector< FloatImage > *pyramid)
 
template<typename Warp >
void TemplatedTrackRegion (const FloatImage &image1, const FloatImage &image2, const double *x1, const double *y1, const TrackRegionOptions &options, double *x2, double *y2, TrackRegionResult *result)
 
void TrackRegion (const FloatImage &image1, const FloatImage &image2, const double *x1, const double *y1, const TrackRegionOptions &options, double *x2, double *y2, TrackRegionResult *result)
 
bool SamplePlanarPatch (const FloatImage &image, const double *xs, const double *ys, int num_samples_x, int num_samples_y, FloatImage *mask, FloatImage *patch, double *warped_position_x, double *warped_position_y)
 
static void ComputeTrackingEquation (const Array3Df &image_and_gradient1, const Array3Df &image_and_gradient2, double x1, double y1, double x2, double y2, int half_width, double lambda, Mat2f *U, Vec2f *e)
 
static bool RegionIsInBounds (const FloatImage &image1, double x, double y, int half_window_size)
 

Typedef Documentation

◆ Array3Df

Definition at line 373 of file array_nd.h.

◆ Array3Di

Definition at line 372 of file array_nd.h.

◆ Array3Ds

typedef Array3D<short> libmv::Array3Ds

Definition at line 374 of file array_nd.h.

◆ Array3Du

typedef Array3D<unsigned char> libmv::Array3Du

Definition at line 370 of file array_nd.h.

◆ Array3Dui

typedef Array3D<unsigned int> libmv::Array3Dui

Definition at line 371 of file array_nd.h.

◆ ByteImage

Definition at line 30 of file libmv/libmv/image/image.h.

◆ EigenDouble

typedef Eigen::NumTraits<double> libmv::EigenDouble

Definition at line 138 of file numeric.h.

◆ FloatImage

Definition at line 31 of file libmv/libmv/image/image.h.

◆ IntImage

Definition at line 34 of file libmv/libmv/image/image.h.

◆ Mat

typedef Eigen::MatrixXd libmv::Mat

Definition at line 60 of file numeric.h.

◆ Mat2

typedef Eigen::Matrix<double, 2, 2> libmv::Mat2

Definition at line 70 of file numeric.h.

◆ Mat23

typedef Eigen::Matrix<double, 2, 3> libmv::Mat23

Definition at line 71 of file numeric.h.

◆ Mat23f

typedef Eigen::Matrix<float, 2, 3> libmv::Mat23f

Definition at line 80 of file numeric.h.

◆ Mat2f

typedef Eigen::Matrix<float, 2, 2> libmv::Mat2f

Definition at line 79 of file numeric.h.

◆ Mat2X

typedef Eigen::Matrix<double, 2, Eigen::Dynamic> libmv::Mat2X

Definition at line 91 of file numeric.h.

◆ Mat3

typedef Eigen::Matrix<double, 3, 3> libmv::Mat3

Definition at line 72 of file numeric.h.

◆ Mat34

typedef Eigen::Matrix<double, 3, 4> libmv::Mat34

Definition at line 73 of file numeric.h.

◆ Mat34f

typedef Eigen::Matrix<float, 3, 4> libmv::Mat34f

Definition at line 82 of file numeric.h.

◆ Mat35

typedef Eigen::Matrix<double, 3, 5> libmv::Mat35

Definition at line 74 of file numeric.h.

◆ Mat35f

typedef Eigen::Matrix<float, 3, 5> libmv::Mat35f

Definition at line 83 of file numeric.h.

◆ Mat3f

typedef Eigen::Matrix<float, 3, 3> libmv::Mat3f

Definition at line 81 of file numeric.h.

◆ Mat3X

typedef Eigen::Matrix<double, 3, Eigen::Dynamic> libmv::Mat3X

Definition at line 92 of file numeric.h.

◆ Mat4

typedef Eigen::Matrix<double, 4, 4> libmv::Mat4

Definition at line 77 of file numeric.h.

◆ Mat41

typedef Eigen::Matrix<double, 4, 1> libmv::Mat41

Definition at line 75 of file numeric.h.

◆ Mat43

typedef Eigen::Matrix<double, 4, 3> libmv::Mat43

Definition at line 76 of file numeric.h.

◆ Mat43f

typedef Eigen::Matrix<float, 4, 3> libmv::Mat43f

Definition at line 84 of file numeric.h.

◆ Mat46

typedef Eigen::Matrix<double, 4, 6> libmv::Mat46

Definition at line 78 of file numeric.h.

◆ Mat46f

typedef Eigen::Matrix<float, 4, 6> libmv::Mat46f

Definition at line 86 of file numeric.h.

◆ Mat4f

typedef Eigen::Matrix<float, 4, 4> libmv::Mat4f

Definition at line 85 of file numeric.h.

◆ Mat4X

typedef Eigen::Matrix<double, 4, Eigen::Dynamic> libmv::Mat4X

Definition at line 93 of file numeric.h.

◆ Matf

typedef Eigen::MatrixXf libmv::Matf

Definition at line 63 of file numeric.h.

◆ Matu

typedef Eigen::Matrix<unsigned int, Eigen::Dynamic, Eigen::Dynamic> libmv::Matu

Definition at line 66 of file numeric.h.

◆ MatX15

typedef Eigen::Matrix<double, Eigen::Dynamic, 15> libmv::MatX15

Definition at line 102 of file numeric.h.

◆ MatX16

typedef Eigen::Matrix<double, Eigen::Dynamic, 16> libmv::MatX16

Definition at line 103 of file numeric.h.

◆ MatX2

typedef Eigen::Matrix<double, Eigen::Dynamic, 2> libmv::MatX2

Definition at line 94 of file numeric.h.

◆ MatX3

typedef Eigen::Matrix<double, Eigen::Dynamic, 3> libmv::MatX3

Definition at line 95 of file numeric.h.

◆ MatX4

typedef Eigen::Matrix<double, Eigen::Dynamic, 4> libmv::MatX4

Definition at line 96 of file numeric.h.

◆ MatX5

typedef Eigen::Matrix<double, Eigen::Dynamic, 5> libmv::MatX5

Definition at line 97 of file numeric.h.

◆ MatX6

typedef Eigen::Matrix<double, Eigen::Dynamic, 6> libmv::MatX6

Definition at line 98 of file numeric.h.

◆ MatX7

typedef Eigen::Matrix<double, Eigen::Dynamic, 7> libmv::MatX7

Definition at line 99 of file numeric.h.

◆ MatX8

typedef Eigen::Matrix<double, Eigen::Dynamic, 8> libmv::MatX8

Definition at line 100 of file numeric.h.

◆ MatX9

typedef Eigen::Matrix<double, Eigen::Dynamic, 9> libmv::MatX9

Definition at line 101 of file numeric.h.

◆ RMat3

typedef Eigen::Matrix<double, 3, 3, Eigen::RowMajor> libmv::RMat3

Definition at line 88 of file numeric.h.

◆ RMat4

typedef Eigen::Matrix<double, 4, 4, Eigen::RowMajor> libmv::RMat4

Definition at line 89 of file numeric.h.

◆ RMatf

typedef Eigen::Matrix<float, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor> libmv::RMatf

Definition at line 136 of file numeric.h.

◆ ShortImage

Definition at line 35 of file libmv/libmv/image/image.h.

◆ ubyte

typedef unsigned char libmv::ubyte

Definition at line 36 of file detect.h.

◆ Vec

typedef Eigen::VectorXd libmv::Vec

Definition at line 61 of file numeric.h.

◆ Vec10

typedef Eigen::Matrix<double, 10, 1> libmv::Vec10

Definition at line 113 of file numeric.h.

◆ Vec11

typedef Eigen::Matrix<double, 11, 1> libmv::Vec11

Definition at line 114 of file numeric.h.

◆ Vec12

typedef Eigen::Matrix<double, 12, 1> libmv::Vec12

Definition at line 115 of file numeric.h.

◆ Vec13

typedef Eigen::Matrix<double, 13, 1> libmv::Vec13

Definition at line 116 of file numeric.h.

◆ Vec14

typedef Eigen::Matrix<double, 14, 1> libmv::Vec14

Definition at line 117 of file numeric.h.

◆ Vec15

typedef Eigen::Matrix<double, 15, 1> libmv::Vec15

Definition at line 118 of file numeric.h.

◆ Vec16

typedef Eigen::Matrix<double, 16, 1> libmv::Vec16

Definition at line 119 of file numeric.h.

◆ Vec17

typedef Eigen::Matrix<double, 17, 1> libmv::Vec17

Definition at line 120 of file numeric.h.

◆ Vec18

typedef Eigen::Matrix<double, 18, 1> libmv::Vec18

Definition at line 121 of file numeric.h.

◆ Vec19

typedef Eigen::Matrix<double, 19, 1> libmv::Vec19

Definition at line 122 of file numeric.h.

◆ Vec2

typedef Eigen::Vector2d libmv::Vec2

Definition at line 105 of file numeric.h.

◆ Vec20

typedef Eigen::Matrix<double, 20, 1> libmv::Vec20

Definition at line 123 of file numeric.h.

◆ Vec2f

typedef Eigen::Vector2f libmv::Vec2f

Definition at line 125 of file numeric.h.

◆ Vec2i

typedef Eigen::Vector2i libmv::Vec2i

Definition at line 131 of file numeric.h.

◆ Vec2u

typedef Eigen::Matrix<unsigned int, 2, 1> libmv::Vec2u

Definition at line 68 of file numeric.h.

◆ Vec3

typedef Eigen::Vector3d libmv::Vec3

Definition at line 106 of file numeric.h.

◆ Vec3f

typedef Eigen::Vector3f libmv::Vec3f

Definition at line 126 of file numeric.h.

◆ Vec3i

typedef Eigen::Vector3i libmv::Vec3i

Definition at line 132 of file numeric.h.

◆ Vec4

typedef Eigen::Vector4d libmv::Vec4

Definition at line 107 of file numeric.h.

◆ Vec4f

typedef Eigen::Vector4f libmv::Vec4f

Definition at line 127 of file numeric.h.

◆ Vec4i

typedef Eigen::Vector4i libmv::Vec4i

Definition at line 133 of file numeric.h.

◆ Vec5

typedef Eigen::Matrix<double, 5, 1> libmv::Vec5

Definition at line 108 of file numeric.h.

◆ Vec6

typedef Eigen::Matrix<double, 6, 1> libmv::Vec6

Definition at line 109 of file numeric.h.

◆ Vec7

typedef Eigen::Matrix<double, 7, 1> libmv::Vec7

Definition at line 110 of file numeric.h.

◆ Vec8

typedef Eigen::Matrix<double, 8, 1> libmv::Vec8

Definition at line 111 of file numeric.h.

◆ Vec9

typedef Eigen::Matrix<double, 9, 1> libmv::Vec9

Definition at line 112 of file numeric.h.

◆ Vecf

typedef Eigen::VectorXf libmv::Vecf

Definition at line 64 of file numeric.h.

◆ vector

template<class ElementType >
using libmv::vector = std::vector<ElementType, Eigen::aligned_allocator<ElementType>>

Definition at line 39 of file libmv/libmv/base/vector.h.

◆ Vecu

typedef Eigen::Matrix<unsigned int, Eigen::Dynamic, 1> libmv::Vecu

Definition at line 67 of file numeric.h.

◆ VecXi

typedef Eigen::VectorXi libmv::VecXi

Definition at line 129 of file numeric.h.

Enumeration Type Documentation

◆ BundleConstraints

Enumerator
BUNDLE_NO_CONSTRAINTS 
BUNDLE_NO_TRANSLATION 

Definition at line 116 of file bundle.h.

◆ BundleIntrinsics

Refine camera poses and 3D coordinates using bundle adjustment.

This routine adjusts all cameras positions, points, and the camera intrinsics (assumed common across all images) in *reconstruction. This assumes a full observation for reconstructed tracks; this implies that if there is a reconstructed 3D point (a bundle) for a track, then all markers for that track will be included in the minimization. tracks should contain markers used in the initial reconstruction.

The cameras, bundles, and intrinsics are refined in-place.

Constraints denotes which blocks to keep constant during bundling. For example it is useful to keep camera translations constant when bundling tripod motions.

If evaluaiton is not null, different evaluation statistics is filled in there, plus all the requested additional information (like jacobian) is also calculating there. Also see comments for BundleEvaluation.

Note
This assumes an outlier-free set of markers.
See also
EuclideanResect, EuclideanIntersect, EuclideanReconstructTwoFrames
Enumerator
BUNDLE_NO_INTRINSICS 
BUNDLE_FOCAL_LENGTH 
BUNDLE_PRINCIPAL_POINT 
BUNDLE_RADIAL_K1 
BUNDLE_RADIAL_K2 
BUNDLE_RADIAL_K3 
BUNDLE_RADIAL_K4 
BUNDLE_RADIAL 
BUNDLE_TANGENTIAL_P1 
BUNDLE_TANGENTIAL_P2 
BUNDLE_TANGENTIAL 

Definition at line 99 of file bundle.h.

◆ DistortionModelType

Enumerator
DISTORTION_MODEL_POLYNOMIAL 
DISTORTION_MODEL_DIVISION 
DISTORTION_MODEL_NUKE 
DISTORTION_MODEL_BROWN 

Definition at line 28 of file distortion_models.h.

◆ NumericJacobianMode

Enumerator
CENTRAL 
FORWARD 

Definition at line 34 of file function_derivative.h.

Function Documentation

◆ aligned_free()

void libmv::aligned_free ( void * ptr)

Definition at line 63 of file aligned_malloc.cc.

References free(), and ptr.

Referenced by libmv::BruteRegionTracker::Track().

◆ aligned_malloc()

void * libmv::aligned_malloc ( int size,
int alignment )

Definition at line 45 of file aligned_malloc.cc.

References NULL, and result.

◆ ApplyBrownDistortionModel()

template<typename T >
void libmv::ApplyBrownDistortionModel ( const T & focal_length_x,
const T & focal_length_y,
const T & principal_point_x,
const T & principal_point_y,
const T & k1,
const T & k2,
const T & k3,
const T & k4,
const T & p1,
const T & p2,
const T & normalized_x,
const T & normalized_y,
T * image_x,
T * image_y )
inline

Definition at line 224 of file distortion_models.h.

References T, x, and y.

Referenced by libmv::BrownCameraIntrinsics::ApplyIntrinsics().

◆ ApplyDivisionDistortionModel()

template<typename T >
void libmv::ApplyDivisionDistortionModel ( const T & focal_length_x,
const T & focal_length_y,
const T & principal_point_x,
const T & principal_point_y,
const T & k1,
const T & k2,
const T & normalized_x,
const T & normalized_y,
T * image_x,
T * image_y )
inline

Definition at line 109 of file distortion_models.h.

References T, and y.

Referenced by libmv::DivisionCameraIntrinsics::ApplyIntrinsics().

◆ ApplyNukeDistortionModel()

void libmv::ApplyNukeDistortionModel ( const double focal_length_x,
const double focal_length_y,
const double principal_point_x,
const double principal_point_y,
const int image_width,
const int image_height,
const double k1,
const double k2,
const double normalized_x,
const double normalized_y,
double * image_x,
double * image_y )

Definition at line 380 of file distortion_models.cc.

References image(), image_height, image_width, and params.

Referenced by libmv::NukeCameraIntrinsics::ApplyIntrinsics().

◆ ApplyPolynomialDistortionModel()

template<typename T >
void libmv::ApplyPolynomialDistortionModel ( const T & focal_length_x,
const T & focal_length_y,
const T & principal_point_x,
const T & principal_point_y,
const T & k1,
const T & k2,
const T & k3,
const T & p1,
const T & p2,
const T & normalized_x,
const T & normalized_y,
T * image_x,
T * image_y )
inline

Definition at line 57 of file distortion_models.h.

References T, x, and y.

Referenced by libmv::PolynomialCameraIntrinsics::ApplyIntrinsics().

◆ ApplyTransformationToPoints()

void libmv::ApplyTransformationToPoints ( const Mat & points,
const Mat3 & T,
Mat * transformed_points )

◆ BlurredImageAndDerivatives()

void libmv::BlurredImageAndDerivatives ( const Array3Df & in,
double sigma,
Array3Df * blurred_image,
Array3Df * gradient_x,
Array3Df * gradient_y )

Definition at line 208 of file convolve.cc.

References ComputeGaussianKernel(), ConvolveHorizontal(), and ConvolveVertical().

◆ BlurredImageAndDerivativesChannels()

void libmv::BlurredImageAndDerivativesChannels ( const Array3Df & in,
double sigma,
Array3Df * blurred_and_gradxy )

◆ BoxFilter()

void libmv::BoxFilter ( const Array3Df & in,
int box_width,
Array3Df * out )

Definition at line 323 of file convolve.cc.

References BoxFilterHorizontal(), and BoxFilterVertical().

◆ BoxFilterHorizontal()

void libmv::BoxFilterHorizontal ( const Array3Df & in,
int window_size,
Array3Df * out_pointer )

Definition at line 255 of file convolve.cc.

References libmv::ArrayND< T, N >::ResizeLike(), and sum().

Referenced by BoxFilter().

◆ BoxFilterVertical()

void libmv::BoxFilterVertical ( const Array3Df & in,
int window_size,
Array3Df * out_pointer )

Definition at line 289 of file convolve.cc.

References libmv::ArrayND< T, N >::ResizeLike(), and sum().

Referenced by BoxFilter().

◆ Build_Minimal2Point_PolynomialFactor()

static bool libmv::Build_Minimal2Point_PolynomialFactor ( const Mat & x1,
const Mat & x2,
double * P )
static

Definition at line 26 of file panography.cc.

References P, and transpose().

Referenced by F_FromCorrespondance_2points().

◆ ByteArrayToScaledFloatArray()

void libmv::ByteArrayToScaledFloatArray ( const Array3Du & byte_array,
Array3Df * float_array )

Convert a byte array into a float array by dividing values by 255.

Definition at line 56 of file array_nd.cc.

References libmv::Array3D< T >::Depth(), libmv::Array3D< T >::Height(), libmv::ArrayND< T, N >::ResizeLike(), and libmv::Array3D< T >::Width().

◆ ceil0()

template<typename FloatType >
FloatType libmv::ceil0 ( const FloatType & value)

Ceil function that has the same behavior for positive and negative values

Definition at line 464 of file numeric.h.

References result.

◆ CheckJacobian()

template<typename Function , typename Jacobian >
bool libmv::CheckJacobian ( const Function & f,
const typename Function::XMatrixType & x )

Definition at line 96 of file function_derivative.h.

References LG.

◆ CompleteReconstructionLogProgress()

static void libmv::CompleteReconstructionLogProgress ( ProgressUpdateCallback * update_callback,
double progress,
const char * step = NULL )
static

◆ ComputeGaussianKernel()

void libmv::ComputeGaussianKernel ( double sigma,
Vec * kernel,
Vec * derivative )

◆ ComputeTrackingEquation() [1/2]

static void libmv::ComputeTrackingEquation ( const Array3Df & image_and_gradient1,
const Array3Df & image_and_gradient2,
double x1,
double y1,
double x2,
double y2,
int half_width,
double lambda,
Mat2f * U,
Vec2f * e )
static

Definition at line 34 of file trklt_region_tracker.cc.

References A, B, C, D, e, I, R, SampleLinear(), V, and W.

◆ ComputeTrackingEquation() [2/2]

static void libmv::ComputeTrackingEquation ( const Array3Df & image_and_gradient1,
const Array3Df & image_and_gradient2,
double x1,
double y1,
double x2,
double y2,
int half_width,
float * gxx,
float * gxy,
float * gyy,
float * ex,
float * ey )
static

Definition at line 36 of file klt_region_tracker.cc.

References I, and SampleLinear().

Referenced by libmv::KltRegionTracker::Track(), and libmv::TrkltRegionTracker::Track().

◆ Convolve()

template<bool vertical>
void libmv::Convolve ( const Array3Df & in,
const Vec & kernel,
Array3Df * out_pointer,
int plane )

Definition at line 102 of file convolve.cc.

References libmv::ArrayND< T, N >::ResizeLike(), static_convolution, sum(), x, and y.

Referenced by ConvolveHorizontal(), and ConvolveVertical().

◆ ConvolveGaussian()

void libmv::ConvolveGaussian ( const Array3Df & in,
double sigma,
Array3Df * out_pointer )

Definition at line 182 of file convolve.cc.

References ComputeGaussianKernel(), ConvolveHorizontal(), and ConvolveVertical().

◆ ConvolveHorizontal()

void libmv::ConvolveHorizontal ( const Array3Df & in,
const Vec & kernel,
Array3Df * out_pointer,
int plane )

◆ ConvolveVertical()

void libmv::ConvolveVertical ( const Array3Df & in,
const Vec & kernel,
Array3Df * out_pointer,
int plane )

◆ CoordinatesForMarkersInImage()

void libmv::CoordinatesForMarkersInImage ( const vector< Marker > & markers,
int image,
Mat * coordinates )

◆ CrossProduct()

Vec3 libmv::CrossProduct ( const Vec3 & x,
const Vec3 & y )
inline

Definition at line 282 of file numeric.h.

◆ CrossProductMatrix()

Mat3 libmv::CrossProductMatrix ( const Vec3 & x)

Definition at line 80 of file numeric.cc.

References X, and x.

Referenced by EssentialFromRt(), ProjectionsFromFundamental(), RotationFromEulerVector(), and RotationRodrigues().

◆ Depth() [1/2]

double libmv::Depth ( const Mat3 & R,
const Vec3 & t,
const Vec3 & X )

Definition at line 229 of file projection.cc.

References R, and X.

Referenced by Depth(), and MotionFromEssentialChooseSolution().

◆ Depth() [2/2]

double libmv::Depth ( const Mat3 & R,
const Vec3 & t,
const Vec4 & X )

Definition at line 233 of file projection.cc.

References Depth(), R, and X.

◆ Detect()

void libmv::Detect ( const FloatImage & image,
const DetectOptions & options,
vector< Feature > * detected_features )

◆ Diag()

template<typename TVec >
Mat libmv::Diag ( const TVec & x)
inline

Definition at line 268 of file numeric.h.

◆ DistanceL1()

template<typename TVec >
double libmv::DistanceL1 ( const TVec & x,
const TVec & y )
inline

Definition at line 207 of file numeric.h.

◆ DistanceL2()

template<typename TVec >
double libmv::DistanceL2 ( const TVec & x,
const TVec & y )
inline

Definition at line 212 of file numeric.h.

◆ DistanceLInfinity()

template<typename TVec >
double libmv::DistanceLInfinity ( const TVec & x,
const TVec & y )
inline

Definition at line 216 of file numeric.h.

Referenced by TEST().

◆ DownsampleChannelsBy2()

void libmv::DownsampleChannelsBy2 ( const Array3Df & in,
Array3Df * out )
inline

Definition at line 95 of file libmv/libmv/image/sample.h.

Referenced by MakePyramid().

◆ DrawCircle()

template<class Image , class Color >
void libmv::DrawCircle ( int x,
int y,
int radius,
const Color & col,
Image * pim )

Definition at line 147 of file image_drawing.h.

References col, and safePutPixel().

◆ DrawEllipse()

template<class Image , class Color >
void libmv::DrawEllipse ( int xc,
int yc,
int radiusA,
int radiusB,
const Color & col,
Image * pim,
double angle = 0.0 )

Definition at line 65 of file image_drawing.h.

References b, col, cos(), safePutPixel(), x, and y.

◆ DrawLine()

template<class Image , class Color >
void libmv::DrawLine ( int xa,
int ya,
int xb,
int yb,
const Color & col,
Image * pim )

Definition at line 185 of file image_drawing.h.

References col, int, N, safePutPixel(), x, and y.

Referenced by TEST(), and TEST().

◆ EightPointSolver()

static double libmv::EightPointSolver ( const Mat & x1,
const Mat & x2,
Mat3 * F )
static

Definition at line 74 of file fundamental.cc.

References A, DCHECK_EQ, DCHECK_GE, Map, and Nullspace().

Referenced by NormalizedEightPointSolver().

◆ EliminateRow()

static void libmv::EliminateRow ( const Mat34 & P,
int row,
Mat * X )
static

Definition at line 33 of file fundamental.cc.

References P, and X.

Referenced by FundamentalFromProjections().

◆ EnforceFundamentalRank2Constraint()

void libmv::EnforceFundamentalRank2Constraint ( Mat3 * F)

Fundamental matrix utility function:

Definition at line 101 of file fundamental.cc.

Referenced by NormalizedEightPointSolver().

◆ EssentialFromFundamental()

void libmv::EssentialFromFundamental ( const Mat3 & F,
const Mat3 & K1,
const Mat3 & K2,
Mat3 * E )

Definition at line 266 of file fundamental.cc.

◆ EssentialFromRt()

void libmv::EssentialFromRt ( const Mat3 & R1,
const Vec3 & t1,
const Mat3 & R2,
const Vec3 & t2,
Mat3 * E )

Definition at line 293 of file fundamental.cc.

References CrossProductMatrix(), R, and RelativeCameraMotion().

◆ EstimateFundamentalFromCorrespondences()

bool libmv::EstimateFundamentalFromCorrespondences ( const Mat & x1,
const Mat & x2,
const EstimateFundamentalOptions & options,
Mat3 * F )

Fundamental transformation estimation.

This function estimates the fundamental transformation from a list of 2D correspondences by doing algebraic estimation first followed with result refinement.

Definition at line 492 of file fundamental.cc.

References callback, F, LG, NormalizedEightPointSolver(), NULL, options, and VLOG.

Referenced by SelectKeyframesBasedOnGRICAndVariance().

◆ EstimateHomography2DFromCorrespondences()

bool libmv::EstimateHomography2DFromCorrespondences ( const Mat & x1,
const Mat & x2,
const EstimateHomographyOptions & options,
Mat3 * H )

2D Homography transformation estimation in the case that points are in euclidean coordinates.

2D homography transformation estimation.

This function estimates the homography transformation from a list of 2D correspondences by doing algebraic estimation first followed with result refinement.

Definition at line 260 of file libmv/multiview/homography.cc.

References callback, H, Homography2DFromCorrespondencesLinear(), LG, NULL, options, T1, T2, and VLOG.

Referenced by libmv_homography2DFromCorrespondencesEuc(), and SelectKeyframesBasedOnGRICAndVariance().

◆ EuclideanBundle()

void libmv::EuclideanBundle ( const Tracks & tracks,
EuclideanReconstruction * reconstruction )

Refine camera poses and 3D coordinates using bundle adjustment.

This routine adjusts all cameras and points in *reconstruction. This assumes a full observation for reconstructed tracks; this implies that if there is a reconstructed 3D point (a bundle) for a track, then all markers for that track will be included in the minimization. tracks should contain markers used in the initial reconstruction.

The cameras and bundles (3D points) are refined in-place.

Note
This assumes an outlier-free set of markers.
This assumes a calibrated reconstruction, e.g. the markers are already corrected for camera intrinsics and radial distortion.
See also
EuclideanResect, EuclideanIntersect, EuclideanReconstructTwoFrames

Definition at line 650 of file bundle.cc.

References BUNDLE_NO_CONSTRAINTS, BUNDLE_NO_INTRINSICS, EuclideanBundleCommonIntrinsics(), NULL, and reconstruction.

◆ EuclideanBundleCommonIntrinsics()

◆ EuclideanCompleteReconstruction()

void libmv::EuclideanCompleteReconstruction ( const Tracks & tracks,
EuclideanReconstruction * reconstruction,
ProgressUpdateCallback * update_callback = NULL )

Estimate camera poses and scene 3D coordinates for all frames and tracks.

This method should be used once there is an initial reconstruction in place, for example by reconstructing from two frames that have a sufficient baseline and number of tracks in common. This function iteratively triangulates points that are visible by cameras that have their pose estimated, then resections (i.e. estimates the pose) of cameras that are not estimated yet that can see triangulated points. This process is repeated until all points and cameras are estimated. Periodically, bundle adjustment is run to ensure a quality reconstruction.

tracks should contain markers used in the reconstruction. reconstruction should contain at least some 3D points or some estimated cameras. The minimum number of cameras is two (with no 3D points) and the minimum number of 3D points (with no estimated cameras) is 5.

See also
EuclideanResect, EuclideanIntersect, EuclideanBundle

Definition at line 345 of file intern/libmv/libmv/simple_pipeline/pipeline.cc.

References InternalCompleteReconstruction(), and reconstruction.

◆ EuclideanIntersect()

bool libmv::EuclideanIntersect ( const vector< Marker > & markers,
EuclideanReconstruction * reconstruction )

Estimate the 3D coordinates of a track by intersecting rays from images.

This takes a set of markers, where each marker is for the same track but different images, and reconstructs the 3D position of that track. Each of the frames for which there is a marker for that track must have a corresponding reconstructed camera in *reconstruction.

markers should contain all markers belonging to tracks visible in all frames. reconstruction should contain the cameras for all frames. The new points will be inserted in reconstruction.

Note
This assumes a calibrated reconstruction, e.g. the markers are already corrected for camera intrinsics and radial distortion.
This assumes an outlier-free set of markers.
See also
EuclideanResect

Definition at line 69 of file intersect.cc.

References libmv::ProjectiveReconstruction::CameraForImage(), e, libmv::Marker::image, libmv::ProjectiveCamera::image, libmv::ProjectiveReconstruction::InsertPoint(), K, LG, LOG, markers, NULL, NViewTriangulateAlgebraic(), P, P_From_KRt(), reconstruction, VLOG, libmv::Marker::weight, X, and x.

Referenced by SelectKeyframesBasedOnGRICAndVariance(), and TEST().

◆ EuclideanReconstructTwoFrames()

bool libmv::EuclideanReconstructTwoFrames ( const vector< Marker > & markers,
EuclideanReconstruction * reconstruction )

Initialize the reconstruction using two frames.

markers should contain all markers belonging to tracks visible in both frames. The pose estimation of the camera for these frames will be inserted into *reconstruction.

Note
The two frames need to have both enough parallax and enough common tracks for accurate reconstruction. At least 8 tracks are suggested.
The origin of the coordinate system is defined to be the camera of the first keyframe.
This assumes a calibrated reconstruction, e.g. the markers are already corrected for camera intrinsics and radial distortion.
This assumes an outlier-free set of markers.
See also
EuclideanResect, EuclideanIntersect, EuclideanBundle

Definition at line 54 of file initialize_reconstruction.cc.

References CoordinatesForMarkersInImage(), F, FundamentalToEssential(), libmv::ProjectiveReconstruction::InsertCamera(), K, LG, markers, MotionFromEssentialAndCorrespondence(), NormalizedEightPointSolver(), R, and reconstruction.

◆ EuclideanReprojectionError()

double libmv::EuclideanReprojectionError ( const Tracks & image_tracks,
const EuclideanReconstruction & reconstruction,
const CameraIntrinsics & intrinsics )

◆ EuclideanResect()

bool libmv::EuclideanResect ( const vector< Marker > & markers,
EuclideanReconstruction * reconstruction,
bool final_pass )

Estimate the Euclidean pose of a camera from 2D to 3D correspondences.

This takes a set of markers visible in one frame (which is the one to resection), such that the markers are also reconstructed in 3D in the reconstruction object, and solves for the pose and orientation of the camera for that frame.

markers should contain markers belonging to tracks visible in the one frame to be resectioned. Each of the tracks associated with the markers must have a corresponding reconstructed 3D position in the *reconstruction object.

*reconstruction should contain the 3D points associated with the tracks for the markers present in markers.

Note
This assumes a calibrated reconstruction, e.g. the markers are already corrected for camera intrinsics and radial distortion.
This assumes an outlier-free set of markers.
Returns
True if the resection was successful, false otherwise.
See also
EuclideanIntersect, EuclideanReconstructTwoFrames

Definition at line 94 of file resect.cc.

References libmv::euclidean_resection::EuclideanResection(), libmv::ProjectiveReconstruction::InsertCamera(), KRt_From_P(), LG, markers, P, params, libmv::ProjectiveReconstruction::PointForTrack(), R, reconstruction, libmv::resection::Resection(), libmv::euclidean_resection::RESECTION_EPNP, RotationFromEulerVector(), transpose(), and libmv::ProjectivePoint::X.

◆ EuclideanScaleToUnity()

void libmv::EuclideanScaleToUnity ( EuclideanReconstruction * reconstruction)

◆ EuclideanToHomogeneous() [1/9]

◆ EuclideanToHomogeneous() [2/9]

Mat3X libmv::EuclideanToHomogeneous ( const Mat2X & x)
inline

Definition at line 67 of file libmv/libmv/multiview/projection.h.

References x.

◆ EuclideanToHomogeneous() [3/9]

void libmv::EuclideanToHomogeneous ( const Mat2X & x,
Mat3X * h )
inline

Definition at line 73 of file libmv/libmv/multiview/projection.h.

References x.

◆ EuclideanToHomogeneous() [4/9]

Mat4X libmv::EuclideanToHomogeneous ( const Mat3X & x)
inline

Definition at line 78 of file libmv/libmv/multiview/projection.h.

References x.

◆ EuclideanToHomogeneous() [5/9]

void libmv::EuclideanToHomogeneous ( const Mat3X & x,
Mat4X * h )
inline

Definition at line 84 of file libmv/libmv/multiview/projection.h.

References x.

◆ EuclideanToHomogeneous() [6/9]

Vec3 libmv::EuclideanToHomogeneous ( const Vec2 & x)
inline

Definition at line 91 of file libmv/libmv/multiview/projection.h.

References x.

◆ EuclideanToHomogeneous() [7/9]

void libmv::EuclideanToHomogeneous ( const Vec2 & X,
Vec3 * H )

Definition at line 208 of file projection.cc.

References H, and X.

◆ EuclideanToHomogeneous() [8/9]

Vec4 libmv::EuclideanToHomogeneous ( const Vec3 & x)
inline

Definition at line 94 of file libmv/libmv/multiview/projection.h.

References x.

◆ EuclideanToHomogeneous() [9/9]

void libmv::EuclideanToHomogeneous ( const Vec3 & X,
Vec4 * H )

Definition at line 212 of file projection.cc.

References H, and X.

◆ EuclideanToNormalizedCamera()

void libmv::EuclideanToNormalizedCamera ( const Mat2X & x,
const Mat3 & K,
Mat2X * n )

◆ ExtractColumns()

template<typename TMat , typename TCols >
TMat libmv::ExtractColumns ( const TMat & A,
const TCols & columns )

◆ F_FromCorrespondance_2points()

void libmv::F_FromCorrespondance_2points ( const Mat & x1,
const Mat & x2,
vector< double > * fs )

◆ FastConvolve()

template<int size, bool vertical>
void libmv::FastConvolve ( const Vec & kernel,
int width,
int height,
const float * src,
int src_stride,
int src_line_stride,
float * dst,
int dst_stride )

Definition at line 67 of file convolve.cc.

References size(), sum(), x, and y.

◆ FloatArrayToScaledByteArray()

void libmv::FloatArrayToScaledByteArray ( const Array3Df & float_array,
Array3Du * byte_array,
bool automatic_range_detection = false )

Convert a float array into a byte array by scaling values by 255* (max-min). where max and min are automatically detected (if automatic_range_detection = true)

Note
and TODO this automatic detection only works when the image contains at least one pixel of both bounds.

Definition at line 27 of file array_nd.cc.

References libmv::Array3D< T >::Depth(), libmv::Array3D< T >::Height(), libmv::ArrayND< T, N >::ResizeLike(), and libmv::Array3D< T >::Width().

◆ FloatImageToUCharArray()

template<class Image >
unsigned char * libmv::FloatImageToUCharArray ( const Image & image)

Definition at line 64 of file image_converter.h.

References image(), and x.

◆ FrobeniusDistance()

template<typename TMat >
double libmv::FrobeniusDistance ( const TMat & A,
const TMat & B )
inline

Definition at line 278 of file numeric.h.

References B, and FrobeniusNorm().

◆ FrobeniusNorm()

template<typename TMat >
double libmv::FrobeniusNorm ( const TMat & A)
inline

Definition at line 273 of file numeric.h.

References sqrt().

Referenced by FrobeniusDistance(), and NormalizeFundamental().

◆ FundamentalFrom7CorrespondencesLinear()

double libmv::FundamentalFrom7CorrespondencesLinear ( const Mat & x1,
const Mat & x2,
std::vector< Mat3 > * F )

7 points (minimal case, points coordinates must be normalized before):

Definition at line 136 of file fundamental.cc.

References A, b, DCHECK_EQ, e, l, Map, Nullspace2(), P, and SolveCubicPolynomial().

Referenced by FundamentalFromCorrespondences7Point().

◆ FundamentalFromCorrespondences7Point()

double libmv::FundamentalFromCorrespondences7Point ( const Mat & x1,
const Mat & x2,
std::vector< Mat3 > * F )

7 points (points coordinates must be in image space):

Definition at line 206 of file fundamental.cc.

References ApplyTransformationToPoints(), DCHECK_EQ, DCHECK_GE, FundamentalFrom7CorrespondencesLinear(), PreconditionerFromPoints(), T1, and T2.

◆ FundamentalFromEssential()

void libmv::FundamentalFromEssential ( const Mat3 & E,
const Mat3 & K1,
const Mat3 & K2,
Mat3 * F )

Definition at line 275 of file fundamental.cc.

◆ FundamentalFromProjections()

void libmv::FundamentalFromProjections ( const Mat34 & P1,
const Mat34 & P2,
Mat3 * F )

Definition at line 54 of file fundamental.cc.

References EliminateRow(), VerticalStack(), X, XY, and Y.

Referenced by libmv::NViewDataSet::F(), and TwoRealisticCameras().

◆ FundamentalToEssential()

void libmv::FundamentalToEssential ( const Mat3 & F,
Mat3 * E )

Find closest essential matrix E to fundamental F

Definition at line 393 of file fundamental.cc.

References b, and LG.

Referenced by EuclideanReconstructTwoFrames(), and SelectKeyframesBasedOnGRICAndVariance().

◆ Gaussian()

double libmv::Gaussian ( double x,
double sigma )
inline

Definition at line 32 of file convolve.h.

References exp(), M_PI, and sqrt().

Referenced by ComputeGaussianKernel(), and GaussianDerivative().

◆ Gaussian2D()

double libmv::Gaussian2D ( double x,
double y,
double sigma )
inline

Definition at line 37 of file convolve.h.

References exp(), and M_PI.

◆ GaussianDerivative()

double libmv::GaussianDerivative ( double x,
double sigma )
inline

Definition at line 41 of file convolve.h.

References Gaussian().

Referenced by ComputeGaussianKernel().

◆ GaussianInversePositive()

double libmv::GaussianInversePositive ( double y,
double sigma )
inline

Definition at line 45 of file convolve.h.

References log(), M_PI, and sqrt().

Referenced by ComputeGaussianKernel().

◆ GetR_FixedCameraCenter()

void libmv::GetR_FixedCameraCenter ( const Mat & x1,
const Mat & x2,
const double focal,
Mat3 * R )

Definition at line 99 of file panography.cc.

References determinant(), K, and normalized().

Referenced by ModalSolver(), and libmv::panography::kernel::TwoPointSolver::Solve().

◆ HomogeneousToEuclidean() [1/8]

◆ HomogeneousToEuclidean() [2/8]

Mat2X libmv::HomogeneousToEuclidean ( const Mat3X & h)
inline

Definition at line 59 of file libmv/libmv/multiview/projection.h.

References e.

◆ HomogeneousToEuclidean() [3/8]

void libmv::HomogeneousToEuclidean ( const Mat3X & h,
Mat2X * e )

Definition at line 178 of file projection.cc.

References e.

◆ HomogeneousToEuclidean() [4/8]

void libmv::HomogeneousToEuclidean ( const Mat4X & h,
Mat3X * e )

Definition at line 183 of file projection.cc.

References e.

◆ HomogeneousToEuclidean() [5/8]

Vec2 libmv::HomogeneousToEuclidean ( const Vec3 & h)
inline

Definition at line 53 of file libmv/libmv/multiview/projection.h.

◆ HomogeneousToEuclidean() [6/8]

void libmv::HomogeneousToEuclidean ( const Vec3 & H,
Vec2 * X )

Definition at line 190 of file projection.cc.

References H, w(), and X.

◆ HomogeneousToEuclidean() [7/8]

Vec3 libmv::HomogeneousToEuclidean ( const Vec4 & h)
inline

Definition at line 56 of file libmv/libmv/multiview/projection.h.

◆ HomogeneousToEuclidean() [8/8]

void libmv::HomogeneousToEuclidean ( const Vec4 & H,
Vec3 * X )

Definition at line 195 of file projection.cc.

References H, w(), and X.

◆ HomogeneousToNormalizedCamera()

void libmv::HomogeneousToNormalizedCamera ( const Mat3X & x,
const Mat3 & K,
Mat2X * n )

Definition at line 224 of file projection.cc.

References HomogeneousToEuclidean(), K, and x.

Referenced by libmv::euclidean_resection::EuclideanResection().

◆ Homography2DFromCorrespondencesLinear()

bool libmv::Homography2DFromCorrespondencesLinear ( const Mat & x1,
const Mat & x2,
Mat3 * H,
double expected_precision )

2D Homography transformation estimation in the case that points are in homogeneous coordinates.

| 0 -x3 x2| |a b c| |y1| -x3*d+x2*g -x3*e+x2*h -x3*f+x2*1 |y1| (-x3*d+x2*g)*y1 (-x3*e+x2*h)*y2 (-x3*f+x2*1)*y3 |0| | x3 0 -x1| * |d e f| * |y2| = x3*a-x1*g x3*b-x1*h x3*c-x1*1 * |y2| = (x3*a-x1*g)*y1 (x3*b-x1*h)*y2 (x3*c-x1*1)*y3 = |0| |-x2 x1 0| |g h 1| |y3| -x2*a+x1*d -x2*b+x1*e -x2*c+x1*f |y3| (-x2*a+x1*d)*y1 (-x2*b+x1*e)*y2 (-x2*c+x1*f)*y3 |0| X = |a b c d e f g h|^t

2D homography transformation estimation.

This function estimates the homography transformation from a list of 2D correspondences which represents either:

  • 3D points on a plane, with a general moving camera.
  • 3D points with a rotating camera (pure rotation).
  • 3D points + different planar projections
Parameters
x1The first 2xN or 3xN matrix of euclidean or homogeneous points.
x2The second 2xN or 3xN matrix of euclidean or homogeneous points.
HThe 3x3 homography transformation matrix (8 dof) such that
x2 = H * x1   with       |a b c|
                     H = |d e f|
                         |g h 1|
expected_precisionThe expected precision in order for instance to accept almost homography matrices.
Returns
True if the transformation estimation has succeeded.
Note
There must be at least 4 non-colinear points.

Definition at line 103 of file libmv/multiview/homography.cc.

References b, H, Homography2DFromCorrespondencesLinearEuc(), L, libmv::Homography2DNormalizedParameterization< T >::To(), and w().

Referenced by EstimateHomography2DFromCorrespondences().

◆ Homography2DFromCorrespondencesLinearEuc()

static bool libmv::Homography2DFromCorrespondencesLinearEuc ( const Mat & x1,
const Mat & x2,
Mat3 * H,
double expected_precision )
static

2D Homography transformation estimation in the case that points are in euclidean coordinates.

x = H y x and y vector must have the same direction, we could write crossproduct(|x|, * H * |y| ) = |0|

| 0 -1 x2| |a b c| |y1| |0| | 1 0 -x1| * |d e f| * |y2| = |0| |-x2 x1 0| |g h 1| |1 | |0|

That gives :

(-d+x2*g)*y1 + (-e+x2*h)*y2 + -f+x2 |0| (a-x1*g)*y1 + (b-x1*h)*y2 + c-x1 = |0| (-x2*a+x1*d)*y1 + (-x2*b+x1*e)*y2 + -x2*c+x1*f |0|

Definition at line 46 of file libmv/multiview/homography.cc.

References b, H, L, and libmv::Homography2DNormalizedParameterization< T >::To().

Referenced by Homography2DFromCorrespondencesLinear().

◆ Homography3DFromCorrespondencesLinear()

bool libmv::Homography3DFromCorrespondencesLinear ( const Mat & x1,
const Mat & x2,
Mat4 * H,
double expected_precision )

x2 ~ A * x1 x2^t * Hi * A *x1 = 0 H1 = H2 = H3 = | 0 0 0 1| |-x2w| |0 0 0 0| | 0 | | 0 0 1 0| |-x2z| | 0 0 0 0| -> | 0 | |0 0 1 0| -> |-x2z| | 0 0 0 0| -> | 0 | | 0 0 0 0| | 0 | |0-1 0 0| | x2y| |-1 0 0 0| | x2x| |-1 0 0 0| | x2x| |0 0 0 0| | 0 | | 0 0 0 0| | 0 | H4 = H5 = H6 = |0 0 0 0| | 0 | | 0 1 0 0| |-x2y| |0 0 0 0| | 0 | |0 0 0 1| -> |-x2w| |-1 0 0 0| -> | x2x| |0 0 0 0| -> | 0 | |0 0 0 0| | 0 | | 0 0 0 0| | 0 | |0 0 0 1| |-x2w| |0-1 0 0| | x2y| | 0 0 0 0| | 0 | |0 0-1 0| | x2z| |a b c d| A = |e f g h| |i j k l| |m n o 1|

x2^t * H1 * A *x1 = (-x2w*a +x2x*m )*x1x + (-x2w*b +x2x*n )*x1y + (-x2w*c +x2x*o )*x1z + (-x2w*d +x2x*1 )*x1w = 0 x2^t * H2 * A *x1 = (-x2z*e +x2y*i )*x1x + (-x2z*f +x2y*j )*x1y + (-x2z*g +x2y*k )*x1z + (-x2z*h +x2y*l )*x1w = 0 x2^t * H3 * A *x1 = (-x2z*a +x2x*i )*x1x + (-x2z*b +x2x*j )*x1y + (-x2z*c +x2x*k )*x1z + (-x2z*d +x2x*l )*x1w = 0 x2^t * H4 * A *x1 = (-x2w*e +x2y*m )*x1x + (-x2w*f +x2y*n )*x1y + (-x2w*g +x2y*o )*x1z + (-x2w*h +x2y*1 )*x1w = 0 x2^t * H5 * A *x1 = (-x2y*a +x2x*e )*x1x + (-x2y*b +x2x*f )*x1y + (-x2y*c +x2x*g )*x1z + (-x2y*d +x2x*h )*x1w = 0 x2^t * H6 * A *x1 = (-x2w*i +x2z*m )*x1x + (-x2w*j +x2z*n )*x1y + (-x2w*k +x2z*o )*x1z + (-x2w*l +x2z*1 )*x1w = 0

X = |a b c d e f g h i j k l m n o|^t

3D Homography transformation estimation.

This function can be used in order to estimate the homography transformation from a list of 3D correspondences.

Parameters
[in]x1The first 4xN matrix of homogeneous points
[in]x2The second 4xN matrix of homogeneous points
[out]HThe 4x4 homography transformation matrix (15 dof) such that
x2 = H * x1   with       |a b c d|
                     H = |e f g h|
                         |i j k l|
                         |m n o 1|
[in]expected_precisionThe expected precision in order for instance to accept almost homography matrices.
Returns
true if the transformation estimation has succeeded
Note
Need at least 5 non coplanar points
Points coordinates must be in homogeneous coordinates

Definition at line 362 of file libmv/multiview/homography.cc.

References b, H, L, libmv::Homography3DNormalizedParameterization< T >::To(), w(), and z().

◆ HorizontalStack()

void libmv::HorizontalStack ( const Mat & left,
const Mat & right,
Mat * stacked )

Definition at line 116 of file numeric.cc.

References left.

◆ HStack()

template<typename T , int RowsLeft, int RowsRight, int ColsLeft, int ColsRight>
Eigen::Matrix< T, ROWS, COLS > libmv::HStack ( const Eigen::Matrix< T, RowsLeft, ColsLeft > & left,
const Eigen::Matrix< T, RowsRight, ColsRight > & right )

Definition at line 378 of file numeric.h.

References left.

Referenced by libmv::NViewDataSet::P().

◆ ImageDerivatives()

void libmv::ImageDerivatives ( const Array3Df & in,
double sigma,
Array3Df * gradient_x,
Array3Df * gradient_y )

Definition at line 191 of file convolve.cc.

References ComputeGaussianKernel(), ConvolveHorizontal(), and ConvolveVertical().

◆ ImageToNormImageCoordinates()

Vec2 libmv::ImageToNormImageCoordinates ( Mat3 & Kinverse,
Vec2 & x )
inline

Transforms a 2D point from pixel image coordinates to a 2D point in normalized image coordinates.

Definition at line 204 of file libmv/libmv/multiview/projection.h.

References EuclideanToHomogeneous(), and HomogeneousToEuclidean().

◆ InternalCompleteReconstruction()

template<typename PipelineRoutines >
void libmv::InternalCompleteReconstruction ( const Tracks & tracks,
typename PipelineRoutines::Reconstruction * reconstruction,
ProgressUpdateCallback * update_callback = NULL )

◆ InternalReprojectionError()

template<typename PipelineRoutines >
double libmv::InternalReprojectionError ( const Tracks & image_tracks,
const typename PipelineRoutines::Reconstruction & reconstruction,
const CameraIntrinsics & intrinsics )

◆ InvertBrownDistortionModel()

void libmv::InvertBrownDistortionModel ( const double focal_length_x,
const double focal_length_y,
const double principal_point_x,
const double principal_point_y,
const double k1,
const double k2,
const double k3,
const double k4,
const double p1,
const double p2,
const double image_x,
const double image_y,
double * normalized_x,
double * normalized_y )

Definition at line 278 of file distortion_models.cc.

References normalized(), and params.

Referenced by libmv::BrownCameraIntrinsics::InvertIntrinsics().

◆ InvertDivisionDistortionModel()

void libmv::InvertDivisionDistortionModel ( const double focal_length_x,
const double focal_length_y,
const double principal_point_x,
const double principal_point_y,
const double k1,
const double k2,
const double image_x,
const double image_y,
double * normalized_x,
double * normalized_y )

Definition at line 240 of file distortion_models.cc.

References normalized(), and params.

Referenced by libmv::DivisionCameraIntrinsics::InvertIntrinsics().

◆ InvertIntrinsicsForTracks()

void libmv::InvertIntrinsicsForTracks ( const Tracks & raw_tracks,
const CameraIntrinsics & camera_intrinsics,
Tracks * calibrated_tracks )

◆ InvertNukeDistortionModel()

template<typename T >
void libmv::InvertNukeDistortionModel ( const T & focal_length_x,
const T & focal_length_y,
const T & principal_point_x,
const T & principal_point_y,
const int image_width,
const int image_height,
const T & k1,
const T & k2,
const T & image_x,
const T & image_y,
T * normalized_x,
T * normalized_y )

◆ InvertPolynomialDistortionModel()

void libmv::InvertPolynomialDistortionModel ( const double focal_length_x,
const double focal_length_y,
const double principal_point_x,
const double principal_point_y,
const double k1,
const double k2,
const double k3,
const double p1,
const double p2,
const double image_x,
const double image_y,
double * normalized_x,
double * normalized_y )

Definition at line 197 of file distortion_models.cc.

References normalized(), and params.

Referenced by libmv::PolynomialCameraIntrinsics::InvertIntrinsics().

◆ isInFrontOfCamera() [1/2]

bool libmv::isInFrontOfCamera ( const Mat34 & P,
const Vec3 & X )
inline

Definition at line 193 of file libmv/libmv/multiview/projection.h.

References isInFrontOfCamera(), P, and X.

◆ isInFrontOfCamera() [2/2]

bool libmv::isInFrontOfCamera ( const Mat34 & P,
const Vec4 & X )
inline

Returns true if the homogenious 3D point X is in front of the camera P.

Definition at line 183 of file libmv/libmv/multiview/projection.h.

References P, and X.

Referenced by isInFrontOfCamera().

◆ isnan()

bool libmv::isnan ( double i)
inline

Definition at line 453 of file numeric.h.

◆ IsotropicPreconditionerFromPoints()

void libmv::IsotropicPreconditionerFromPoints ( const Mat & points,
Mat3 * T )

Definition at line 50 of file conditioning.cc.

References e, MeanAndVarianceAlongRows(), and sqrt().

Referenced by NormalizeIsotropicPoints().

◆ KRt_From_P()

void libmv::KRt_From_P ( const Mat34 & P,
Mat3 * Kp,
Mat3 * Rp,
Vec3 * tp )

Definition at line 32 of file projection.cc.

References K, l, P, R, and sqrt().

Referenced by EuclideanResect().

◆ LaplaceFilter()

void libmv::LaplaceFilter ( unsigned char * src,
unsigned char * dst,
int width,
int height,
int strength )

Convolve src into dst with the discrete laplacian operator.

src and dst should be width x height images. strength is an interpolation coefficient (0-256) between original image and the laplacian.

Note
Make sure the search region is filtered with the same strength as the pattern.

Definition at line 329 of file convolve.cc.

References l, and x.

◆ LinearInitAxis()

void libmv::LinearInitAxis ( float x,
int size,
int * x1,
int * x2,
float * dx )
inline

Definition at line 36 of file libmv/libmv/image/sample.h.

References x.

Referenced by SampleLinear(), and SampleLinear().

◆ LookAt()

Mat3 libmv::LookAt ( Vec3 center)

Definition at line 69 of file numeric.cc.

References R.

Referenced by NRealisticCamerasFull(), and NRealisticCamerasSparse().

◆ MakePyramid()

static void libmv::MakePyramid ( const FloatImage & image,
int num_levels,
std::vector< FloatImage > * pyramid )
static

Definition at line 32 of file pyramid_region_tracker.cc.

References DownsampleChannelsBy2(), and image().

Referenced by libmv::PyramidRegionTracker::Track().

◆ MatrixColumn() [1/3]

void libmv::MatrixColumn ( const Mat & A,
int i,
Vec2 * v )

Definition at line 127 of file numeric.cc.

References A, and v.

Referenced by TEST().

◆ MatrixColumn() [2/3]

void libmv::MatrixColumn ( const Mat & A,
int i,
Vec3 * v )

Definition at line 131 of file numeric.cc.

References A, and v.

◆ MatrixColumn() [3/3]

void libmv::MatrixColumn ( const Mat & A,
int i,
Vec4 * v )

Definition at line 135 of file numeric.cc.

References A, and v.

◆ MeanAndVarianceAlongRows()

void libmv::MeanAndVarianceAlongRows ( const Mat & A,
Vec * mean_pointer,
Vec * variance_pointer )

◆ ModalSolver()

void libmv::ModalSolver ( const Tracks & tracks,
EuclideanReconstruction * reconstruction,
ProgressUpdateCallback * update_callback = NULL )

This solver solves such camera motion as tripod rotation, reconstructing only camera motion itself. Bundles are not reconstructing properly, they're just getting projected onto sphere.

Markers from tracks object would be used for recosntruction, and algorithm assumes thir's positions are undistorted already and they're in nnormalized space.

Reconstructed cameras and projected bundles would be added to reconstruction object.

Definition at line 106 of file modal_solver.cc.

References e, GetR_FixedCameraCenter(), image(), libmv::Marker::image, libmv::ProjectiveReconstruction::InsertCamera(), libmv::ProjectiveReconstruction::InsertPoint(), LG, NULL, libmv::ProjectiveReconstruction::PointForTrack(), R, reconstruction, libmv::Marker::track, libmv::Marker::weight, X, libmv::Marker::x, and libmv::Marker::y.

Referenced by TEST().

◆ MotionFromEssential()

void libmv::MotionFromEssential ( const Mat3 & E,
std::vector< Mat3 > * Rs,
std::vector< Vec3 > * ts )

Definition at line 303 of file fundamental.cc.

References W.

Referenced by MotionFromEssentialAndCorrespondence().

◆ MotionFromEssentialAndCorrespondence()

bool libmv::MotionFromEssentialAndCorrespondence ( const Mat3 & E,
const Mat3 & K1,
const Vec2 & x1,
const Mat3 & K2,
const Vec2 & x2,
Mat3 * R,
Vec3 * t )

◆ MotionFromEssentialChooseSolution()

int libmv::MotionFromEssentialChooseSolution ( const std::vector< Mat3 > & Rs,
const std::vector< Vec3 > & ts,
const Mat3 & K1,
const Vec2 & x1,
const Mat3 & K2,
const Vec2 & x2 )

Choose one of the four possible motion solutions from an essential matrix.

Decides the right solution by checking that the triangulation of a match x1–x2 lies in front of the cameras. See HZ 9.6 pag 259 (9.6.3 Geometrical interpretation of the 4 solutions)

Returns
index of the right solution or -1 if no solution.

Definition at line 342 of file fundamental.cc.

References DCHECK_EQ, Depth(), P_From_KRt(), TriangulateDLT(), and X.

Referenced by MotionFromEssentialAndCorrespondence().

◆ MultiplyElements() [1/3]

template<typename AArrayType , typename BArrayType , typename CArrayType >
void libmv::MultiplyElements ( const AArrayType & a,
const BArrayType & b,
CArrayType * c )

Definition at line 398 of file array_nd.h.

References b.

◆ MultiplyElements() [2/3]

template<typename TA , typename TB , typename TC >
void libmv::MultiplyElements ( const Array3D< TA > & a,
const Array3D< TB > & b,
Array3D< TC > * c )

Definition at line 452 of file array_nd.h.

References b, and libmv::ArrayND< T, N >::ResizeLike().

◆ MultiplyElements() [3/3]

template<typename TA , typename TB , typename TC >
void libmv::MultiplyElements ( const ArrayND< TA, 3 > & a,
const ArrayND< TB, 3 > & b,
ArrayND< TC, 3 > * c )

Definition at line 434 of file array_nd.h.

References b, and libmv::ArrayND< T, N >::ResizeLike().

◆ NormalizedEightPointSolver()

double libmv::NormalizedEightPointSolver ( const Mat & x1,
const Mat & x2,
Mat3 * F )

◆ NormalizeFundamental()

void libmv::NormalizeFundamental ( const Mat3 & F,
Mat3 * F_normalized )

Definition at line 234 of file fundamental.cc.

References FrobeniusNorm().

◆ NormalizeIsotropicPoints()

void libmv::NormalizeIsotropicPoints ( const Mat & points,
Mat * normalized_points,
Mat3 * T )

◆ NormalizeL1()

template<typename TVec >
double libmv::NormalizeL1 ( TVec * x)
inline

Definition at line 223 of file numeric.h.

References norm(), and NormL1().

Referenced by ComputeGaussianKernel().

◆ NormalizeL2()

template<typename TVec >
double libmv::NormalizeL2 ( TVec * x)
inline

Definition at line 232 of file numeric.h.

References norm(), and NormL2().

◆ NormalizeLInfinity()

template<typename TVec >
double libmv::NormalizeLInfinity ( TVec * x)
inline

Definition at line 241 of file numeric.h.

References norm(), and NormLInfinity().

◆ NormalizePoints()

void libmv::NormalizePoints ( const Mat & points,
Mat * normalized_points,
Mat3 * T )

◆ NormL1()

template<typename TVec >
double libmv::NormL1 ( const TVec & x)
inline

Definition at line 192 of file numeric.h.

Referenced by NormalizeL1().

◆ NormL2()

template<typename TVec >
double libmv::NormL2 ( const TVec & x)
inline

Definition at line 197 of file numeric.h.

Referenced by NormalizeL2().

◆ NormLInfinity()

template<typename TVec >
double libmv::NormLInfinity ( const TVec & x)
inline

Definition at line 202 of file numeric.h.

Referenced by NormalizeLInfinity().

◆ NRealisticCamerasFull()

◆ NRealisticCamerasSparse()

◆ Nullspace()

template<typename TMat , typename TVec >
double libmv::Nullspace ( TMat * A,
TVec * nullspace )

◆ Nullspace2()

template<typename TMat , typename TVec1 , typename TVec2 >
double libmv::Nullspace2 ( TMat * A,
TVec1 * x1,
TVec2 * x2 )

Definition at line 174 of file numeric.h.

Referenced by FundamentalFrom7CorrespondencesLinear().

◆ NViewTriangulate()

template<typename T >
void libmv::NViewTriangulate ( const Matrix< T, 2, Dynamic > & x,
const vector< Matrix< T, 3, 4 > > & Ps,
Matrix< T, 4, 1 > * X )

Definition at line 38 of file nviewtriangulation.h.

References Nullspace(), X, and x.

◆ NViewTriangulateAlgebraic()

template<typename T >
void libmv::NViewTriangulateAlgebraic ( const Matrix< T, 2, Dynamic > & x,
const vector< Matrix< T, 3, 4 > > & Ps,
Matrix< T, 4, 1 > * X )

Definition at line 64 of file nviewtriangulation.h.

References Nullspace(), SkewMatMinimal(), and X.

Referenced by EuclideanIntersect(), and ProjectiveIntersect().

◆ operator<<() [1/2]

◆ operator<<() [2/2]

std::ostream & libmv::operator<< ( std::ostream & os,
const Feature & feature )

◆ P_From_KRt()

void libmv::P_From_KRt ( const Mat3 & K,
const Mat3 & R,
const Vec3 & t,
Mat34 * P )

◆ PearsonProductMomentCorrelation()

double libmv::PearsonProductMomentCorrelation ( const FloatImage & image_and_gradient1_sampled,
const FloatImage & image_and_gradient2_sampled )
inline

◆ PreconditionerFromPoints()

void libmv::PreconditionerFromPoints ( const Mat & points,
Mat3 * T )

◆ PrintArray()

void libmv::PrintArray ( const Array3Df & array)

Definition at line 85 of file array_nd.cc.

References printf.

◆ Project() [1/11]

Mat2X libmv::Project ( const Mat34 & P,
const Mat3X & X )
inline

Definition at line 164 of file libmv/libmv/multiview/projection.h.

References P, Project(), X, and x.

◆ Project() [2/11]

Mat2X libmv::Project ( const Mat34 & P,
const Mat3X & X,
const Vecu & ids )
inline

Definition at line 170 of file libmv/libmv/multiview/projection.h.

References P, Project(), X, and x.

◆ Project() [3/11]

void libmv::Project ( const Mat34 & P,
const Mat3X & X,
const Vecu & ids,
Mat2X * x )
inline

Definition at line 153 of file libmv/libmv/multiview/projection.h.

References P, and X.

◆ Project() [4/11]

void libmv::Project ( const Mat34 & P,
const Mat3X & X,
Mat2X * x )
inline

Definition at line 143 of file libmv/libmv/multiview/projection.h.

References P, and X.

◆ Project() [5/11]

Mat2X libmv::Project ( const Mat34 & P,
const Mat4X & X )
inline

Definition at line 137 of file libmv/libmv/multiview/projection.h.

References P, Project(), X, and x.

◆ Project() [6/11]

void libmv::Project ( const Mat34 & P,
const Mat4X & X,
Mat2X * x )
inline

Definition at line 129 of file libmv/libmv/multiview/projection.h.

References P, and X.

◆ Project() [7/11]

◆ Project() [8/11]

void libmv::Project ( const Mat34 & P,
const Vec3 & X,
Vec2 * x )
inline

Definition at line 123 of file libmv/libmv/multiview/projection.h.

References P, Project(), and X.

◆ Project() [9/11]

void libmv::Project ( const Mat34 & P,
const Vec3 & X,
Vec3 * x )
inline

Definition at line 117 of file libmv/libmv/multiview/projection.h.

References P, Project(), and X.

◆ Project() [10/11]

void libmv::Project ( const Mat34 & P,
const Vec4 & X,
Vec2 * x )
inline

Definition at line 112 of file libmv/libmv/multiview/projection.h.

References P, and X.

◆ Project() [11/11]

void libmv::Project ( const Mat34 & P,
const Vec4 & X,
Vec3 * x )
inline

Definition at line 108 of file libmv/libmv/multiview/projection.h.

References P, and X.

◆ ProjectionChangeAspectRatio()

void libmv::ProjectionChangeAspectRatio ( const Mat34 & P,
const Vec2 & principal_point,
double aspect_ratio,
double aspect_ratio_new,
Mat34 * P_new )

Definition at line 148 of file projection.cc.

References P, ProjectionShiftPrincipalPoint(), and T.

◆ ProjectionsFromFundamental()

void libmv::ProjectionsFromFundamental ( const Mat3 & F,
Mat34 * P1,
Mat34 * P2 )

Definition at line 45 of file fundamental.cc.

References CrossProductMatrix(), F, and Nullspace().

Referenced by ProjectiveReconstructTwoFrames().

◆ ProjectionShiftPrincipalPoint()

void libmv::ProjectionShiftPrincipalPoint ( const Mat34 & P,
const Vec2 & principal_point,
const Vec2 & principal_point_new,
Mat34 * P_new )

Definition at line 135 of file projection.cc.

References P, and T.

Referenced by ProjectionChangeAspectRatio().

◆ ProjectiveBundle()

void libmv::ProjectiveBundle ( const Tracks & tracks,
ProjectiveReconstruction * reconstruction )

Refine camera poses and 3D coordinates using bundle adjustment.

This routine adjusts all cameras and points in *reconstruction. This assumes a full observation for reconstructed tracks; this implies that if there is a reconstructed 3D point (a bundle) for a track, then all markers for that track will be included in the minimization. tracks should contain markers used in the initial reconstruction.

The cameras and bundles (homogeneous 3D points) are refined in-place.

Note
This assumes an outlier-free set of markers.
This assumes that radial distortion is already corrected for, but does not assume that that other intrinsics are.
See also
ProjectiveResect, ProjectiveIntersect, ProjectiveReconstructTwoFrames

Definition at line 852 of file bundle.cc.

◆ ProjectiveCompleteReconstruction()

void libmv::ProjectiveCompleteReconstruction ( const Tracks & tracks,
ProjectiveReconstruction * reconstruction )

Estimate camera matrices and homogeneous 3D coordinates for all frames and tracks.

This method should be used once there is an initial reconstruction in place, for example by reconstructing from two frames that have a sufficient baseline and number of tracks in common. This function iteratively triangulates points that are visible by cameras that have their pose estimated, then resections (i.e. estimates the pose) of cameras that are not estimated yet that can see triangulated points. This process is repeated until all points and cameras are estimated. Periodically, bundle adjustment is run to ensure a quality reconstruction.

tracks should contain markers used in the reconstruction. reconstruction should contain at least some 3D points or some estimated cameras. The minimum number of cameras is two (with no 3D points) and the minimum number of 3D points (with no estimated cameras) is 5.

See also
ProjectiveResect, ProjectiveIntersect, ProjectiveBundle

Definition at line 352 of file intern/libmv/libmv/simple_pipeline/pipeline.cc.

References InternalCompleteReconstruction(), and reconstruction.

◆ ProjectiveIntersect()

bool libmv::ProjectiveIntersect ( const vector< Marker > & markers,
ProjectiveReconstruction * reconstruction )

Estimate the homogeneous coordinates of a track by intersecting rays.

This takes a set of markers, where each marker is for the same track but different images, and reconstructs the homogeneous 3D position of that track. Each of the frames for which there is a marker for that track must have a corresponding reconstructed camera in *reconstruction.

markers should contain all markers belonging to tracks visible in all frames. reconstruction should contain the cameras for all frames. The new points will be inserted in reconstruction.

Note
This assumes that radial distortion is already corrected for, but does not assume that e.g. focal length and principal point are accounted for.
This assumes an outlier-free set of markers.
See also
Resect

Definition at line 203 of file intersect.cc.

References libmv::ProjectiveReconstruction::CameraForImage(), libmv::ProjectiveReconstruction::InsertPoint(), LG, LOG, markers, NViewTriangulateAlgebraic(), libmv::ProjectiveCamera::P, params, reconstruction, X, and x.

◆ ProjectiveReconstructTwoFrames()

bool libmv::ProjectiveReconstructTwoFrames ( const vector< Marker > & markers,
ProjectiveReconstruction * reconstruction )

Initialize the reconstruction using two frames.

markers should contain all markers belonging to tracks visible in both frames. An estimate of the projection matrices for the two frames will get added to the reconstruction.

Note
The two frames need to have both enough parallax and enough common tracks for accurate reconstruction. At least 8 tracks are suggested.
The origin of the coordinate system is defined to be the camera of the first keyframe.
This assumes the markers are already corrected for radial distortion.
This assumes an outlier-free set of markers.
See also
ProjectiveResect, ProjectiveIntersect, ProjectiveBundle

Definition at line 142 of file initialize_reconstruction.cc.

References CoordinatesForMarkersInImage(), F, libmv::ProjectiveReconstruction::InsertCamera(), LG, Map, markers, NormalizedEightPointSolver(), params, ProjectionsFromFundamental(), and reconstruction.

◆ ProjectiveReprojectionError()

double libmv::ProjectiveReprojectionError ( const Tracks & image_tracks,
const ProjectiveReconstruction & reconstruction,
const CameraIntrinsics & intrinsics )

◆ ProjectiveResect()

bool libmv::ProjectiveResect ( const vector< Marker > & markers,
ProjectiveReconstruction * reconstruction )

Estimate the projective pose of a camera from 2D to 3D correspondences.

This takes a set of markers visible in one frame (which is the one to resection), such that the markers are also reconstructed in a projective frame in the reconstruction object, and solves for the projective matrix of the camera for that frame.

markers should contain markers belonging to tracks visible in the one frame to be resectioned. Each of the tracks associated with the markers must have a corresponding reconstructed homogeneous 3D position in the *reconstruction object.

*reconstruction should contain the homogeneous 3D points associated with the tracks for the markers present in markers.

Note
This assumes radial distortion has already been corrected, but otherwise works for uncalibrated sequences.
This assumes an outlier-free set of markers.
Returns
True if the resection was successful, false otherwise.
See also
ProjectiveIntersect, ProjectiveReconstructTwoFrames

Definition at line 225 of file resect.cc.

References libmv::ProjectiveReconstruction::InsertCamera(), LG, Map, markers, P, params, libmv::ProjectiveReconstruction::PointForTrack(), reconstruction, libmv::resection::Resection(), and libmv::ProjectivePoint::X.

◆ RegionIsInBounds() [1/2]

static bool libmv::RegionIsInBounds ( const FloatImage & image1,
double x,
double y,
int half_window_size )
static

◆ RegionIsInBounds() [2/2]

static bool libmv::RegionIsInBounds ( const FloatImage & image1,
double x,
double y,
int half_window_size )
static

◆ RelativeCameraMotion()

void libmv::RelativeCameraMotion ( const Mat3 & R1,
const Vec3 & t1,
const Mat3 & R2,
const Vec3 & t2,
Mat3 * R,
Vec3 * t )

Compute the relative camera motion between two cameras.

Given the motion parameters of two cameras, computes the motion parameters of the second one assuming the first one to be at the origin. If T1 and T2 are the camera motions, the computed relative motion is T = T2 T1^{-1}

Definition at line 282 of file fundamental.cc.

References R.

Referenced by EssentialFromRt().

◆ reshape()

template<typename TMat , typename TDest >
void libmv::reshape ( const TMat & a,
int rows,
int cols,
TDest * b )

Definition at line 443 of file numeric.h.

References b.

Referenced by libmv::resection::Resection().

◆ RGB2GRAY()

template<typename T >
T libmv::RGB2GRAY ( const T r,
const T g,
const T b )
inline

Definition at line 32 of file image_converter.h.

References b.

Referenced by Rgb2Gray().

◆ Rgb2Gray()

template<class ImageIn , class ImageOut >
void libmv::Rgb2Gray ( const ImageIn & imaIn,
ImageOut * imaOut )

Definition at line 46 of file image_converter.h.

References RGB2GRAY().

Referenced by Detect().

◆ RootMeanSquareError() [1/2]

double libmv::RootMeanSquareError ( const Mat2X & x_image,
const Mat3X & X_world,
const Mat3 & K,
const Mat3 & R,
const Vec3 & t )
inline

Estimates the root mean square error (2D)

Definition at line 219 of file libmv/libmv/multiview/projection.h.

References K, P, P_From_KRt(), Project(), and R.

◆ RootMeanSquareError() [2/2]

double libmv::RootMeanSquareError ( const Mat2X & x_image,
const Mat4X & X_world,
const Mat34 & P )
inline

Estimates the root mean square error (2D)

Definition at line 210 of file libmv/libmv/multiview/projection.h.

References P, and Project().

Referenced by libmv::euclidean_resection::EuclideanResectionEPnP().

◆ RotationAroundX()

Mat3 libmv::RotationAroundX ( double angle)

Definition at line 25 of file numeric.cc.

References R.

Referenced by TEST(), and TwoRealisticCameras().

◆ RotationAroundY()

Mat3 libmv::RotationAroundY ( double angle)

Definition at line 37 of file numeric.cc.

References R.

◆ RotationAroundZ()

Mat3 libmv::RotationAroundZ ( double angle)

Definition at line 49 of file numeric.cc.

References R.

Referenced by TEST(), and TwoRealisticCameras().

◆ RotationFromEulerVector()

Mat3 libmv::RotationFromEulerVector ( Vec3 euler_vector)
inline

Returns the rotaiton matrix built from given vector of euler angles.

Definition at line 484 of file numeric.h.

References cos(), CrossProductMatrix(), and w().

Referenced by EuclideanResect().

◆ RotationRodrigues()

Mat3 libmv::RotationRodrigues ( const Vec3 & axis)

Definition at line 61 of file numeric.cc.

References cos(), CrossProductMatrix(), W, and w().

◆ safePutPixel() [1/2]

template<class Image , class Color >
void libmv::safePutPixel ( int yc,
int xc,
const Color & col,
Image * pim )
inline

Put the pixel in the image to the given color only if the point (xc,yc) is inside the image.

Definition at line 37 of file image_drawing.h.

References col.

Referenced by DrawCircle(), DrawEllipse(), and DrawLine().

◆ safePutPixel() [2/2]

template<class Image , class Color >
void libmv::safePutPixel ( int yc,
int xc,
const Color * col,
Image * pim )
inline

Put the pixel in the image to the given color only if the point (xc,yc) is inside the image. This function support multi-channel color

Note
The color pointer col must have size as the image depth

Definition at line 49 of file image_drawing.h.

References col.

◆ SampleLinear() [1/2]

template<typename T >
T libmv::SampleLinear ( const Array3D< T > & image,
float y,
float x,
int v = 0 )
inline

Linear interpolation.

Definition at line 55 of file libmv/libmv/image/sample.h.

References image(), LinearInitAxis(), T, and v.

Referenced by ComputeTrackingEquation(), ComputeTrackingEquation(), SamplePattern(), and SamplePlanarPatch().

◆ SampleLinear() [2/2]

template<typename T >
void libmv::SampleLinear ( const Array3D< T > & image,
float y,
float x,
T * sample )
inline

Linear interpolation, of all channels. The sample is assumed to have the same size as the number of channels in image.

Definition at line 74 of file libmv/libmv/image/sample.h.

References image(), LinearInitAxis(), sample, and T.

◆ SampleNearest()

template<typename T >
T libmv::SampleNearest ( const Array3D< T > & image,
float y,
float x,
int v = 0 )
inline

Nearest neighbor interpolation.

Definition at line 30 of file libmv/libmv/image/sample.h.

References image(), int, and v.

◆ SamplePattern()

void libmv::SamplePattern ( const FloatImage & image,
double x,
double y,
int half_width,
int channels,
FloatImage * sampled )
inline

◆ SamplePlanarPatch()

bool libmv::SamplePlanarPatch ( const FloatImage & image,
const double * xs,
const double * ys,
int num_samples_x,
int num_samples_y,
FloatImage * mask,
FloatImage * patch,
double * warped_position_x,
double * warped_position_y )

◆ SampsonDistance()

double libmv::SampsonDistance ( const Mat & F,
const Vec2 & x1,
const Vec2 & x2 )

Approximate squared reprojection errror.

See page 287 of HZ equation 11.9. This avoids triangulating the point, relying only on the entries in F.

Definition at line 241 of file fundamental.cc.

References Square, x, and y.

◆ SelectKeyframesBasedOnGRICAndVariance()

◆ SkewMat()

Mat3 libmv::SkewMat ( const Vec3 & x)
inline

Returns the skew anti-symmetric matrix of a vector.

Definition at line 470 of file numeric.h.

References x.

Referenced by libmv::homography::homography2D::AlgebraicError::Residuals().

◆ SkewMatMinimal()

Mat23 libmv::SkewMatMinimal ( const Vec2 & x)
inline

Returns the skew anti-symmetric matrix of a vector with only the first two (independent) lines

Definition at line 477 of file numeric.h.

References x.

Referenced by NViewTriangulateAlgebraic().

◆ SolveCubicPolynomial() [1/2]

template<typename Real >
int libmv::SolveCubicPolynomial ( const Real * coeffs,
Real * solutions )

Definition at line 108 of file poly.h.

References b, and SolveCubicPolynomial().

◆ SolveCubicPolynomial() [2/2]

template<typename Real >
int libmv::SolveCubicPolynomial ( Real a,
Real b,
Real c,
Real * x0,
Real * x1,
Real * x2 )

Definition at line 40 of file poly.h.

References A, B, b, cos(), fabs(), M_PI, norm(), pow(), R, and sqrt().

Referenced by F_FromCorrespondance_2points(), FundamentalFrom7CorrespondencesLinear(), and SolveCubicPolynomial().

◆ SplitChannels()

void libmv::SplitChannels ( const Array3Df & input,
Array3Df * channel0,
Array3Df * channel1,
Array3Df * channel2 )

Definition at line 68 of file array_nd.cc.

References libmv::Array3D< T >::Resize().

◆ Square()

template<typename T >
T libmv::Square ( T x)
inline

Definition at line 249 of file numeric.h.

References x.

◆ SVD()

template<typename TMat , typename TVec >
void libmv::SVD ( TMat * ,
Vec * ,
Mat * ,
Mat *  )
inline

Definition at line 149 of file numeric.h.

◆ SymmetricEpipolarDistance()

double libmv::SymmetricEpipolarDistance ( const Mat & F,
const Vec2 & x1,
const Vec2 & x2 )

Calculates the sum of the distances from the points to the epipolar lines.

See page 288 of HZ equation 11.10.

Definition at line 253 of file fundamental.cc.

References Square, x, and y.

Referenced by SelectKeyframesBasedOnGRICAndVariance().

◆ SymmetricGeometricDistance()

double libmv::SymmetricGeometricDistance ( const Mat3 & H,
const Vec2 & x1,
const Vec2 & x2 )

Calculate symmetric geometric cost:

D(H * x1, x2)^2 + D(H^-1 * x2, x1)

Definition at line 448 of file libmv/multiview/homography.cc.

References H, x, and y.

Referenced by SelectKeyframesBasedOnGRICAndVariance().

◆ TemplatedTrackRegion()

◆ TEST() [1/18]

libmv::TEST ( Detect ,
FASTSinglePointTest  )

Definition at line 141 of file detect_test.cc.

References libmv::DetectOptions::FAST, and options.

◆ TEST() [2/18]

libmv::TEST ( Detect ,
HarrisSinglePointTest  )

Definition at line 203 of file detect_test.cc.

References libmv::DetectOptions::HARRIS, and options.

◆ TEST() [3/18]

libmv::TEST ( Detect ,
HarrisSingleTriangleTest  )

Definition at line 216 of file detect_test.cc.

References e, libmv::DetectOptions::HARRIS, and options.

◆ TEST() [4/18]

◆ TEST() [5/18]

◆ TEST() [6/18]

◆ TEST() [7/18]

◆ TEST() [8/18]

◆ TEST() [9/18]

◆ TEST() [10/18]

◆ TEST() [11/18]

◆ TEST() [12/18]

◆ TEST() [13/18]

◆ TEST() [14/18]

◆ TEST() [15/18]

◆ TEST() [16/18]

◆ TEST() [17/18]

◆ TEST() [18/18]

◆ TrackRegion()

void libmv::TrackRegion ( const FloatImage & image1,
const FloatImage & image2,
const double * x1,
const double * y1,
const TrackRegionOptions & options,
double * x2,
double * y2,
TrackRegionResult * result )

Definition at line 1540 of file libmv/tracking/track_region.cc.

References HANDLE_MODE.

◆ TransposeInPlace()

template<class TA >
void libmv::TransposeInPlace ( TA * A)
inline

Definition at line 187 of file numeric.h.

◆ TriangulateDLT() [1/2]

void libmv::TriangulateDLT ( const Mat34 & P1,
const Vec2 & x1,
const Mat34 & P2,
const Vec2 & x2,
Vec3 * X_euclidean )

Definition at line 44 of file triangulation.cc.

References HomogeneousToEuclidean(), and TriangulateDLT().

◆ TriangulateDLT() [2/2]

void libmv::TriangulateDLT ( const Mat34 & P1,
const Vec2 & x1,
const Mat34 & P2,
const Vec2 & x2,
Vec4 * X_homogeneous )

Definition at line 29 of file triangulation.cc.

References Nullspace().

Referenced by MotionFromEssentialChooseSolution(), and TriangulateDLT().

◆ TwoRealisticCameras()

◆ VerticalStack()

template<typename TTop , typename TBot , typename TStacked >
void libmv::VerticalStack ( const TTop & top,
const TBot & bottom,
TStacked * stacked )

Definition at line 418 of file numeric.h.

References top.

Referenced by FundamentalFromProjections().

◆ VStack()

template<typename T , int RowsLeft, int RowsRight, int ColsLeft, int ColsRight>
Eigen::Matrix< T, COLS, ROWS > libmv::VStack ( const Eigen::Matrix< T, ColsLeft, RowsLeft > & top,
const Eigen::Matrix< T, ColsRight, RowsRight > & bottom )

Definition at line 398 of file numeric.h.

References top.