Just One Image is All It Takes
Rectification, Auto-Calibration and Scene Parsing from Affine-Correspondences of Repetitive Textures
Presenter: James Pritts
Czech Technical University in Prague
Applied Algebra and Geometry Group (AAG)
Czech Institute of Informatics, Robotics and Cybernetics (CIIRC)
Funded by Robotics for Industry (R4I) Robotics for Industry 4.0 (reg. no. CZ.02.1.01/0.0/0.0/15_003/0000470)
Tutorial: Affine Correspondences and their Applications
Daniel Barath, Dmytro Mishkin, James Pritts, Levente Hajder
final
Collaborators
2
Talk Outline
3
What good are Repetitive Textures?
4
Restore Invariants
Encode Invariants
Solve
Assumption: Coplanar repeats are related by isometries
Rectification
5
input
rectification
input
rectification
input
rectification
Gravity Direction
6
Symmetry Detection and Segmentation
7
7
[7] Pritts et al. Rectification and Segmentation of Coplanar Repeated Patterns. In CVPR, 2014
Wallpaper
Arbitrarily repeated
Sets of corresponding LAFs
7/23
wallpaper
isometries
rotational symmetry
input
Ridiculously Wide-Baseline Stereo Matching
8
ortho-photos
ortho-photos
first input
second input
undistorted image
undistorted image
Auto-Calibration and Scene Parsing
9
input
vanishing point labeling
vanishing line labeling
undistorted
1st rectified plane
2nd rectified plane
Detecting Coplanar Repeats
10
What is a Coplanar Repeat?
11
imaged translational symmetries
X and X′ are coplanar scene points so that
imaged rigid transform
rectified patches
distortion
homography
undistortion
where
Coplanar Repeats are image regions related by imaged rigid transforms
Detection and Representation
12
Extraction
Construction
Description
Affine-Covariant Scene
13
Point Parameterization of Affine-Covariant Feature
14
normalized patch
detections
Affine-Covariant Regions vs Points
Good Correspondences
Region Measurements
15
Perspective Image
Affine Rectification
≠
unequal area
equal area
Why not SIFTS? (similarity covariant)
Repetitive Texture Detection by Appearance Clustering
16
Single-link agglomerative clustering
Correspondence Pipeline
17
Tentative coplanar repeats
Descriptor clustering
Affine-Covariant Region Detection
Affine frame representation & description
Camera Geometry
18
Pinhole Camera
19
Pinhole Camera Viewing Scene Plane
20
Radial Lens Distortion
Cameras with large lens distortions are commonly used
Rectification Solvers
RANSAC
21
GoPro Hero 4 Wide image
barrel distortion
radial component
Division-Model of Radial Lens Undistortion
one-parameter division model
22
distortion center subtracted
image point
pinhole point
image plane
Image sizes:
Distorted Chess Board
23
Imaged Vanishing Point Geometry
24
vanishing point
Avoid Image Space for Solver Design
25
Image Correspondences
Minimal Solvers for Undistortion, Rectification and Auto-Calibration
Rectification and Reversing the Imaging Process
Camera viewing a scene plane
27
perspective
image point
scene plane point
Perspective Image
Pre-imaging decomposition
Metric Rectification
Affine Rectification
similarity
affinity
projectivity
Rectification of Distorted Coplanar Repeats
Translations and Reflections
28
Rigid Transformations
Joint Undistortion and Rectification
29
Ignore distortion it in the first phase
Model in the final optimization step (LO)
Jointly Solve for Undistortion & Rectification
Warp Error
30
12 px
32 px
65 px
Image size: 3000x2250 px
estimated rectification
imaging by ground truth
affine ambiguity
Increasing Undistortion Parameter Estimation Error
Conjugate Translations
31
Radially-Distorted Conjugate Translations
32
Eliminating Vanishing Point (EVP) Solvers
Radially-Distorted Conjugate Translations Solvers
Minimal configuration of coplanar repeats
33
Constraints
Input
Undistortion
Rectification
One-direction EVP solvers
Two-direction EVP solvers
(1)
(2)
(3)
(4)
EVP variants
One-direction variant
Two-direction variant
Radially-Distorted Conjugate Translations
l | 2 DOF vanishing line |
u | 2 DOF vanishing line |
siu | 1 DOF magnitude trans. |
| 1 DOF div. model param. |
siu | constrained to be the same for at least two |
Meets of Joined Points
34
image of vanishing line
imaged vp
imaged vp
Meets of Joined Affine-Covariant Correspondence
35
Eliminating Vanishing Line (EVL) Solver
Meets of Joins Solver
36
l | 2 DOF vanishing line |
| 1 DOF div. model param. |
3 directions are needed to construct
Best Minimal Solution Selection (BMSS)
Input
Undistortion
Rectification
Constraints
Clever Constraint Design Matters
37
Solvers | AC Configuration | Solutions | Complexity |
Radially-Distorted Conjugate Translations | 1 | 4 | Groebner Basis, Elimination template 14x18 |
Meets of Joined Csponds. | 1 | 4 | quartic |
VS
The Equal-Rectified Scales Constraint
Geometric invariant of affine-rectified space is used to put algebraic constraints on the unknowns of .
38
rectifying function
Imaged Scene Plane
Rectified Scene Plane
Corresponded Sets (instead of Correspondences)
39
222
32
4
Directly-Encoded Scale
40
Rectified scale is the determinant of its rectified points
rectifying
l | 2 DOF vanishing line |
| 1 DOF div. model param. |
Directly-Encoded Scale (DES) Solvers
41
Input
Undistortion
Rectification
DES solvers
Undistortion
Rectified cut-out
Input
Constraints
Rectified scale is the determinant of its rectified points
Change of Scale Due to Imaging
Relative scale change is only a function of the vanishing line and undistortion function.
Idea: Linearize affine rectification and compute Jacobian determinant
42
smaller rel. scale
larger rel. scale
Change of Scale
43
rectifying
Inhomogenous
Formulation!
Change of Scale (CS) Solvers
44
Rectification
Change of Scale
Change of Scale Due to Imaging
Constraints
The Jacobian determinant approximates
change of scale of the rectifying and undistorting function near the image point
CS
solvers
Undistortion
Rectified cut-out
Input
Minimal configuration of coplanar repeats
Clever Constraint Doesn’t Matter
45
Solvers | AC Configuration | Solutions | Complexity |
Directly Encoded Scale (DES) | 222 | 54 | Groebner Basis, Elimination template 133x187 |
Change of Scale (CS) | 222 | 54 | Groebner Basis, Elimination template 133x187 |
VS
DES
CS
Vanilla RANSAC performance
46
Metric Upgrade from Affine-Rectified Rigid Transforms
47
Metric Upgrade from Affine-Rectified Rigid Transforms
48
where
Semi-Metric Upgrade from Affine-Rect. Glide Reflections
49
Pritts et al., Detection, Rectification and Segmentation of Coplanar Repeated Patterns. In CVPR, 2014
Semi-Metric Upgrade from Affine-Rect. Glide Reflections
50
Pritts et al., Detection, Rectification and Segmentation of Coplanar Repeated Patterns. In CVPR, 2014
Maximum-Likelihood Estimation
51
LO-RANSAC framework
(1) sample from tentatively grouped repeats → (2) joint hypothesis on undistortion and affine rectification
→ (3) metric upgrade → (4) locally optimize on maximal consensus sets → (1) until converged
The Best of Both Worlds?
52
Pritts et al.: 4 point correspondences
Covariant regions are noisy thus provide less accuracy
Wildenauer et al.:
Antunes et al.:
5 circular arcs
7 circular arcs
Circular arcs are hard to group as imaged parallel scene lines
Wildenauer, 3 circular arcs
Complementary Features Along Manhattan Directions
53
Imaged Translational Symmetries
Imaged Parallel Scene Lines
Configurations of Vanishing Points
54
3 distinct VPs
Coplanar
Orthogonal
vanishing line
image of an absolute conic
2 VPs are coincident
2 distinct VPs
Sampling Feature Configurations
55
Hybrid RANSAC
Tentative Groups of Regions
Tentative Groups of Arcs
Undistortion
Rectifications
vanishing point
vanishing line
undistorted images of parallel lines
image of the absolute conic
Family of Minimal Solvers
Common Constraints
point csponds
circular arcs
Samayang 12 mm fisheye lens
Scene Parsing
56
input
vanishing point labeling
vanishing line labeling
undistorted
first-plane rectified
second-plane rectified
Manhattan Frame Rectification
57
Input
Undistorted
Manhattan Planes Rectified
Percentage of Top-1 Solutions of Focal Length (AIT)
58
Solver | % of Top-1 |
| 1.5% |
| 10.2% |
| 15.5% |
| 21.7% |
| 25.4% |
| 25.7% |
SOTA
Proposed
AIT Dataset Performance
59
Disentangling Focal Length and Lens Undistortion
60
Reality Check
AIT Dataset Performance
62
Shape Parameters of Affine-Covariant Region
63
Frobenius Norm is Geometric Error of Shapes
64
E. Riba, D. Mishkin, et al., Kornia: an Open Source Differentiable Computer Vision Library for PyTorch, In WACV 2020
Thanks for the image Dima!
Prior Work
65
The papers that are most directly related to the work presented here.
Tutorial Bibliography
66
Y. Lochman, O. Dobosevych, R. Hryniv, and J. Pritts. Minimal Solvers for Single-View Auto-Calibration. In WACV, 2021 |
J. Pritts, Z. Kukelova, V. Larsson, Y. Lochman, and O. Chum. Minimal Solvers for Rectifying from Radially-Distorted Conjugate Translations. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2021 |
J. Pritts, Z. Kukelova, V. Larsson, Y. Lochman, and O. Chum. Minimal Solvers for Rectifying from Radially-Distorted Scales and Change of Scales. International Journal of Computer Vision, 128(4), 950–968, 2020 |
J. Pritts, Z. Kukelova, V. Larsson, and O. Chum. Rectification from Radially-Distorted Scales. In ACCV, 2018 |
J. Pritts, Z. Kukelova, V. Larsson, and O. Chum. Radially-Distorted Conjugate Translations. In CVPR, 2018 |
J. Pritts, D. Rozumnyi, M. P. Kumar, and O. Chum. Coplanar Repeats by Energy Minimization. In BMVC, 2016 |
J. Pritts, O. Chum, and J. Matas. Detection, Rectification and Segmentation of Coplanar Repeated Patterns. In CVPR, 2014 |
Q&A Session
67
Thank You!
[1] H. Stewenius. Gröbner Basis Methods for Minimal Problems in Computer Vision. Centre for Mathematical Sciences, Lund University, 2005
68
Pose problem,
port problem
to ℤp
Port to ℝ
Build matrix based Gröbner basis code
Compute number
of solutions
Pose problem
over ℝ
Backsubstitute
Compute action matrix, solve eigen problem
Compute
Gröbner basis
Offline:
Online: