Get to know:
Multiple View Geometry & OpenMVG
Agenda
Tutorial on 3D reconstruction from images
OpenMVG (retrospective on creating an open source project)
Q&A
3D reconstruction from images
Multiple-View Stereovision
Multi-View Geometry
What are we gonna learn about?
Bearing vector
Camera Intrinsics
Camera Pose|Extrinsics
Residual Error
Triangulation
Tracks
Camera geometry | Projective geometry
Camera geometry | Projective geometry
Camera geometry | Projective geometry
Camera geometry | Projective geometry
Camera geometry | Projective geometry
Camera geometry | Projective geometry
(x’,y’) = (ui,vi) / wi
Bearing = RT * K-1 (x,y,1)
Cartesian coordinates
Homogeneous coordinates (W)
x = (xi,yi) ->x,y,w
X = (X,Y,Z) -> X,Y,Z,W
Camera geometry | Projective geometry
Two view geometry
What happen if we have two camera, as human do?
Two view geometry
What happen if we have two camera, as human do?
Two view geometry
What happen if we have two camera, as human do?
Two view geometry
What happen if we have two camera, as human do?
{X} given C,C’ and x,x’
Yes and No
Two view geometry
What happen if we have two camera, as human do?
{X} given C,C’ and x,x’
Yes and No
NOISE
Two view geometry
What happen if we have two camera, as human do?
{X} given C,C’ and x,x’
Yes and No
NOISE
Residual Error
Residual Error
Image Plane (Pixels)
Angular (Radian/Degree)
Cheirality | Positive Depth
Depth of a point | Projected along the Z camera axis (direction of looking)
Why do we need to know?
behind a camera (outlier)
depth > 0
depth < 0
Depth = (R*X)[2] + t[2]
Two view geometry
What happen if we have two camera, as human do?
Epipolar Geometry
Projection of points along the bearing vector are projected to a line
Epipolar Geometry
Projection of points along the bearing vector are projected to a line
e (Epipole)
Fundamental matrix | Essential Matrix
Relation point - ligne F [3x3] | E [3x3]
Pixel coords ->
Bearing vectors ->
Epipoles ->
Fundamental matrix | Essential Matrix
Relation point - ligne F [3x3] | E [3x3]
Pixel coords ->
F -> rank2 -> 7 Dof
Bearing vectors ->
E -> 5Dof (R:3Dof + t:2dof (scale independent))
Two view geometry
What happen if we have two camera, as human do?
Essential Matrix -> Relative pose
Bearing vectors ->
E -> 5Dof (R:3Dof + t:2dof (scale independent))
Essential matrix -> [R|t] -> relative pose
Spherical camera | Epipolar geometry
Epipolar geometry is still valid for Spherical cameras:
Cool fact: Epipole always visible
-> Show in which direction the other camera is
Two view geometry
What happen if we have two camera, as human do?
Absolute pose
Find the camera parameters given 2D - 3D correspondences
Two view geometry
What happen if we have two camera, as human do?
Homography | Planar constraint
What happen if 3D points belong to the same plane?
2d-2d correspondences
H is a 2D projective linear relation
Cool fact: Reversible L->R | R->L
Two view geometry
What happen if we have two camera, as human do?
Robust estimation
Find agreement in chaos?
Hypothesis -> A model exists and points belong or do not belong
Common framework: RANSAC: RANdom Sampling Consensus
Robust estimation
Find agreement in chaos? => RANSAC
Hypothesis -> A model exists and points belong or do not belong
How many point support a random sample hypothesis?
Robust estimation
Find agreement in chaos? => RANSAC
Hypothesis -> A model exists and points belong or do not belong
How many point support a random sample hypothesis?
Which Value?
Which Metric?
Robust estimation
Find agreement in chaos? => RANSAC
Hypothesis -> A model exists and points belong or do not belong
How many point support a random sample hypothesis:
Which Value?
Empiric
i.e 2 pixel
Which Metric?
Algebraic vs pixel
With or without dimension
Robust estimation (Homography)
Two view geometry
What happen if we have two camera, as human do?
Lens/Camera distortion
Mathematical modelization of the Lens distortion
Distortion <-> Undistortion
Lens | Math model (i.e polynomial)
So camera parameters become: lens coef. ; K (principal point + focal length)
Polynomial of degree 1, degree 3; Degree 3 + Tangential (Brown-Conrady)
A note on camera distortion & epipolar geometry
Epipolar Line -> Curve!
If using distortion | un-distortion methods -> no more problem
Two view geometry
What happen if we have two camera, as human do?
Bundle adjustment
Let’s say we start from some initial parameters?
Non Linear Least Square optimization:
-> Working from 2 to N views
Multiple-view geometry
What happen if we have more camera, as human do when we move?
Multiple-view geometry
What happen if we have more camera, as human do when we move?
Feature matching
Describe image with Local Feature & descriptors
Nearest neighbors!
Feature tracking
How can we retrieve corresponding 2d observations to a 3D potential points?
Large Scale Matching
Compute
Features
Compute
Matches
Geometric
Filter
Which image pairs to match?
Tracks
Exhaustive [Default]
Video (n-next)
GPS neighborhood
Pre-emptive
matching
VLAD
Local(sampling)
Global
Feature independent
Pairs
Pairs
Pairs
Brute-Force [Too Slow]
Approximate Nearest Neighbors
Multiple-view geometry
What happen if we have more camera, as human do when we move?
Structure from Motion | SfM
Structure from Motion | Approach
Incremental
Global
[ACCV12] Moulon P. et al. Adaptive Structure from Motion with a contrario model estimation.
[ICCV13] Moulon P. et al. Global Fusion of Relative Motions for Robust, Accurate and Scalable Structure from Motion.
What do you need to remember
Bearing vector
Camera Intrinsics
Camera Pose|Extrinsics
Residual Error
Triangulation
Tracks
What do you need to remember
Geometric solver (H, F, E,...) -> (X Degree of Freedom | Y correspondences):
Projective geometry -> convenient (Linear Least Squares: SVD is your best friend)
Bundle Adjustment
Resources (Which book to read?)
Computer Vision: Algorithms and Applications, 2nd ed. © 2021 Richard Szeliski, -> Online version https://szeliski.org/Book/
Multiple View Geometry in Computer Vision. Richard Hartley and Andrew Zisserman, March 2004. https://www.robots.ox.ac.uk/~vgg/hzbook/
Multi-View Stereo: A Tutorial. Yasutaka Furukawa and Carlos Hernandez. Foundations and Trends in Computer Graphics and Vision, 2015.
https://github.com/openMVG/awesome_3DReconstruction_list
OpenMVG:
Open Multiple-View Geometry
55
Agenda
OpenMVG?
The Framework
Creating pipelines
Showcases
Challenges and opportunities
Take Home Message
56
[OpenMVG] The long term goal
2013: Create an accessible; patent free & permissive library for 3D reconstruction from images
Focus on Multiple View Geometry & Structure From Motion
57
[OpenMVG] The Vision
What is OpenMVG?
Mission
Vision
Credo
58
[OpenMVG] How hard could it be?
The magic: Linear formulation is all you need to build a SFM pipeline
The dark side: Needed for robustness and speed
59
Pictures
Image
description
Image matching
SfM
OSS: It takes time, commitment, time...
60
VLAD
Stellar SfM
Implementation of many papers along the road
Minimal solvers (Relative/Absolute pose)
.. [Nister] An Efficient Solution to the Five-Point Relative Pose. PAMI 2004
.. [Kneip] A Novel Parametrization of the P3P-Problem for a Direct Computation of Absolute Camera Position and Orientation. CVPR 2011
.. [Ke] An Efficient Algebraic Solution to the Perspective-Three-Point Problem. CVPR 2017
.. [Nordberg] Lambda Twist: An Accurate Fast Robust Perspective Three Point (P3P) Solver. ECCV 2018
Triangulation
.. [Lee] Closed-Form Optimal Triangulation Based on Angular Errors. ICCV 2019; Triangulation: Why Optimize? BMVC 2019
.. [LinfNorm] L infinity Minimization in Geometric Reconstruction Problems. CVPR 2004
Robust estimation
.. [ACRANSAC] Automatic homographic registration of a pair of images, with a contrario elimination of outliers. IPOL 2012
Global Structure from motion
Global
.. [Govindu] "Combining two-view constraints for motion estimation". CVPR 2001
.. [Martinec] Robust Multiview Reconstruction. 2008
.. [Chatterjee] Efficient and Robust Large-Scale Rotation Averaging. ICCV 2013
.. [Kyle2014] Robust Global Translations with 1DSfM. ECCV 2014
.. [GlobalACSfM] Global Fusion of Relative Motions for Robust, Accurate and Scalable Structure from Motion. ICCV, 2013
Sequential
.. [ACSfM] Adaptive structure from motion with a contrario model estimation. ACCV, 2012.
Tracking
.. [TracksCVMP12] Unordered feature tracking made fast and easy. CVMP 2012.
61
exhaustive list here
OpenMVG
The framework
62
OpenMVG framework
63
Pictures
Image
description
Image matching
SfM
Task
Data
Provider
Data
Storage
Binaries
Pipelines
SfMInit_ImageListing
ComputeFeatures
ComputeMatches
Libraries
SfM
Localization
Export
Import
EvalQuality
OpenMVG framework
64
Pictures
Image
description
Image matching
SfM
Task
Data
Provider
Data
Storage
Binaries
Pipelines
SfMInit_ImageListing
ComputeFeatures
ComputeMatches
Abstraction Layer
Data Layer
Libraries
Implementation Layer
SfM
Localization
Export
Import
EvalQuality
OpenMVG framework
65
Pictures
Image
description
Image matching
SfM
Task
Data
Provider
Data
Storage
Binaries
Pipelines
SfMInit_ImageListing
ComputeFeatures
ComputeMatches
Data Layer
Libraries
Implementation Layer
SfM
Localization
Export
Import
EvalQuality
Features/Regions
Provider
Matches_provider
OpenMVG framework
66
Pictures
Image
description
Image matching
SfM
Task
Data
Provider
Data
Storage
Binaries
Pipelines
SfMInit_ImageListing
ComputeFeatures
ComputeMatches
Libraries
Implementation Layer
SfM
Localization
Export
Import
EvalQuality
SfM_data
Regions
PairWiseMatches
Features/Regions
Provider
Matches_provider
Viewgraph
OpenMVG framework
67
Pictures
Image
description
Image matching
SfM
Task
Data
Provider
Data
Storage
SfM_data
Regions
PairWiseMatches
Features/Regions
Provider
Matches_provider
Libraries
Image
Features
Matching
Robust estimation
SfM
BundleAdjustment
Multiview
Camera
Graph
MatchingImageCollection
Tracking
Geometry
Viewgraph
Binaries
Pipelines
SfMInit_ImageListing
ComputeFeatures
ComputeMatches
SfM
Localization
Export
Import
EvalQuality
OpenMVG Import/Export
68
export
import
Blender
PLY
MetaShape
PMVS
NVM
COLMAP
MVE
OpenMVS
SphericalToCubic
HTML - WebGL
...
Kitti
Middlebury
ETH3D
DTUMVS
BlendedMVS
...
SfM
EvalQuality
Benchmark
GT poses
Images
VFX
Image
Based
Modeling
Dense
Point
Cloud
Textured
Mesh
Point Cloud
Refined Mesh
Textured Mesh
OpenMVG pipelines
69
SfM_data
SFM_DATA
SfM_Data Kesako?
SfM_Data → an interoperable data container
70
SfM_Data Kesako?
SfM_Data → an interoperable data container
71
struct SfM_Data
{
Views views; // MAP: Used images
Poses poses; // Map: Poses data
Intrinsics intrinsics; // Map: Intrinsics camera data
Landmarks structure; // Structure (3D pts with 2D observations)
};
struct View
{
std::string s_Img_path; // image path on disk
IndexT id_view; // UID of the view
IndexT id_intrinsic; // ID (unique or shared)
IndexT id_pose; // ID (unique or shared)
};
SfM_Data Kesako?
SfM_Data → an interoperable data container
72
Shared
Views:
Id 0
Id 1
Id 2
Intrinsics
Poses
Id0: PinholeRadial3
Id 0
Id 1
Id 2
Id1: Pinhole
struct SfM_Data
{
Views views; // MAP: Used images
Poses poses; // Map: Poses data
Intrinsics intrinsics; // Map: Intrinsics camera data
Landmarks structure; // Structure (3D pts with 2D observations)
};
struct View
{
std::string s_Img_path; // image path on disk
IndexT id_view; // UID of the view
IndexT id_intrinsic; // ID (unique or shared)
IndexT id_pose; // ID (unique or shared)
};
Usage Toolkits
73
OpenMVG usage
74
OnDevice SfM (Android/ARM)
HUNGARY
Map the present & the past
SWITZERLAND
OpenCV - OpenMVG - MVE
(Feat / SfM / MVS)
OpenMVG usage
75
Forensics 3D Printed Prosthetic
OpenMVG usage
3D Survey for Science dissemination
76
Credits:
Drone Survey: DroneContrast,
Path planning and processing: R. Janvier (custom pipeline made from openMVG),
Sponsor and Organizer: Intelligence des Patrimoines (University of Tours and University of Orléans, Fr.)
OpenMVG usage
3D Survey for Science dissemination
77
Credits:
Drone Survey: DroneContrast,
Path planning and processing: R. Janvier (custom pipeline made from openMVG building blocks!),
Sponsor and Organizer: Intelligence des Patrimoines (University of Tours and University of Orléans, Fr.)
OpenMVG usage
Civil engineering (stone degradation monitoring), Volubilis ,Morocco.
78
Credits: University of Orléans, Fr.
"Collaborative Augmented Reality on Smartphones via Life-long City-scale Maps" ISMAR 2020
79
Challenges &
Opportunities
80
Challenges and opportunities
Understand the community typical usage and needs → OpenMVG 2019 Survey
Requests
81
Longevity | Dataset size | Pipelines | Derivative work |
40% uses OpenMVG for 3+ years | 1000+ images | Incremental SfM prefered pipeline | 30% users build custom pipelines from OpenMVG |
Opportunities/Challenges
Awareness
Accessibility
Community
82
Speed
Relevance
Where are we ‘OpenMVG perspectives?
83
Have
WIP
[Context] OpenSource SfM toolkits
84
Data as show on Github on april 8th 2021
Project | Created in | License | #Contributors | #Releases | #GithubStars | #GithubForks | Continuous Integration |
Bundler-SfM | 2008 | GPL | 11 | 4 | 1303 | 459 | NO |
OpenMVG | 2013 | MPL2 | 74 | 17 | 3460 | 1.3k | YES |
MVE | 2014 (SFM) | BSD 3-Clause license | 28 | X | 750 | 358 | YES |
Telesculptor | 2014 | BSD 3-Clause license | 19 | 26 | 396 | 129 | YES |
TheiaSfM | 2015 | New BSD license | 30 | 7 | 650 | 239 | NO |
OpenSFM | 2015 | Simplified BSD license | 69 | 11 | 2031 | 601 | YES |
Colmap | 2018 | BSD 3-clause license | 57 | 16 | 2832 | 757 | YES |
Take Home Message
85
What’s next
Scalability
Align the interests of ML and CV communities (Kapture?)
Please join us for better features/matches, ...
86
Take home message
Flexible framework for Reproducible Research
Easy interoperability
Convenient Import/Export
Community & knowledge focused
87
88