Computer)Vision)ECE739) - McMaster University

27
Computer Vision ECE739 Feature Based Alignments and Image S;tching By: Dónal Finnerty Edited by: S. Shirani

Transcript of Computer)Vision)ECE739) - McMaster University

Page 1: Computer)Vision)ECE739) - McMaster University

Computer  Vision  ECE739  Feature  Based  Alignments  and  Image  

S;tching  By:  Dónal  Finnerty  Edited  by:  S.  Shirani  

Page 2: Computer)Vision)ECE739) - McMaster University

Feature  Based  Alignment  

•  We  have  the  feature  points.  •  How  can  we  match  the  features?  

Page 3: Computer)Vision)ECE739) - McMaster University

Chapter  Contents  

2D  and  3D  feature-­‐based  alignment  – 2D  alignment  using  least  squares  –  Itera;ve  algorithms  – Robust  least  squares  and  RANSAC  – 3D  alignment  •  Panography  

Page 4: Computer)Vision)ECE739) - McMaster University

2D  Geometric  Transla;ons  

p=(tx,  ty)  p=(tx,  ty,, θ)  

p=(tx,  ty,, a, b)  p=(tx,  ty,, a00, a01, a10, a11)  

p=(h00,  h01, h02, h10, h11, h12 , h20, h21, h22)  

Page 5: Computer)Vision)ECE739) - McMaster University

Least  Squares  Method  

x  x’  

Page 6: Computer)Vision)ECE739) - McMaster University

Weighted  Least  Squares  Method  

x  x’  

Page 7: Computer)Vision)ECE739) - McMaster University

Linear  Least  Squares  Method  

Page 8: Computer)Vision)ECE739) - McMaster University

Non-­‐Linear  Least  Squares  Method  

Page 9: Computer)Vision)ECE739) - McMaster University

The  Drawback  of  ELS  

0  

1  

2  

3  

4  

5  

6  

0   0.2   0.4   0.6   0.8   1   1.2   1.4  

Volta

ge  [V

]  

Input  [W]  

Least  Squares  Approxima9on  

Page 10: Computer)Vision)ECE739) - McMaster University

The  Drawback  of  ELS  

0  

1  

2  

3  

4  

5  

6  

0   0.2   0.4   0.6   0.8   1   1.2   1.4  

Volta

ge  [V

]  

Input  [W]  

Least  Squares  Approxima9on  

Outlier  

Page 11: Computer)Vision)ECE739) - McMaster University

Robust  Least  Squares  Method  

Page 12: Computer)Vision)ECE739) - McMaster University

for  i=1:1:S  1. Randomally  select  a  subset  of  the  data  2. Compute  the  transforma;on  from  this  subset  3. Count  the  number  of  “inliers”  4. If  the  number  of  “inliers”  is  “sufficiently”  large  recalculate  the  transforma;on  including  “inliers”.  end  

RANdom  SAmple  Concensus  RANSAC  

Page 13: Computer)Vision)ECE739) - McMaster University

RANdom  SAmple  Concensus  RANSAC  

0  

1  

2  

3  

4  

5  

6  

0   0.2   0.4   0.6   0.8   1   1.2   1.4  

Volta

ge  [V

]  

Input  [W]  

Least  Squares  Approxima9on  

Page 14: Computer)Vision)ECE739) - McMaster University

RANdom  SAmple  Concensus  RANSAC  

0  

1  

2  

3  

4  

5  

6  

0   0.2   0.4   0.6   0.8   1   1.2   1.4  

Volta

ge  [V

]  

Input  [W]  

Least  Squares  Approxima9on  

ϵ  

Page 15: Computer)Vision)ECE739) - McMaster University

RANdom  SAmple  Concensus  RANSAC  

0  

1  

2  

3  

4  

5  

6  

0   0.2   0.4   0.6   0.8   1   1.2   1.4  

Volta

ge  [V

]  

Input  [W]  

Least  Squares  Approxima9on  

Page 16: Computer)Vision)ECE739) - McMaster University

RANdom  SAmple  Concensus  RANSAC  

0  

1  

2  

3  

4  

5  

6  

0   0.2   0.4   0.6   0.8   1   1.2   1.4  

Volta

ge  [V

]  

Input  [W]  

Least  Squares  Approxima9on  

Page 17: Computer)Vision)ECE739) - McMaster University

RANdom  SAmple  Concensus  RANSAC  

0  

1  

2  

3  

4  

5  

6  

0   0.2   0.4   0.6   0.8   1   1.2   1.4  

Volta

ge  [V

]  

Input  [W]  

Least  Squares  Approxima9on  

Page 18: Computer)Vision)ECE739) - McMaster University

RANdom  SAmple  Concensus  RANSAC  

0  

1  

2  

3  

4  

5  

6  

0   0.2   0.4   0.6   0.8   1   1.2   1.4  

Volta

ge  [V

]  

Input  [W]  

Least  Squares  Approxima9on  

Page 19: Computer)Vision)ECE739) - McMaster University

Problems  with  RANSAC  

•  k:  the  amount  of  samples  ini;ally  taken  for  the  data  subset  

•  p:  the  probability  that  a  randomly  chosen  sample  is  an  “inlier”  to  its  own  transform.  

•  S  the  number  of  ;mes  to  iterate  RANSAC  for  a    99%  probability  of  success  

k   p   S  3   0.5   35  6   0.6   97  6   0.5   293  

Page 20: Computer)Vision)ECE739) - McMaster University

PROgressive  SAmple  Concensus  PROSAC  

0  

1  

2  

3  

4  

5  

6  

0   0.2   0.4   0.6   0.8   1   1.2   1.4  

Volta

ge  [V

]  

Input  [W]  

Least  Squares  Approxima9on  

Page 21: Computer)Vision)ECE739) - McMaster University

PROgressive  SAmple  Concensus  PROSAC  

0  

1  

2  

3  

4  

5  

6  

0   0.2   0.4   0.6   0.8   1   1.2   1.4  

Volta

ge  [V

]  

Input  [W]  

Least  Squares  Approxima9on  

Page 22: Computer)Vision)ECE739) - McMaster University

•  The  ini;al  subset  of  data  is  chosen  in  a  “semi-­‐random”  process.  

PROgressive  SAmple  Concensus  PROSAC  

Samples   RANSAC   PROSAC  

Average   106,534   9  

Time   10.76  [s]   0.06  [s]  

Min   97,702   5  

Max   146,069   29  

Page 23: Computer)Vision)ECE739) - McMaster University

Panography  

•  Three  images  translated  together  and  averaged  

[Szeliski]  

Page 24: Computer)Vision)ECE739) - McMaster University

Panography  

Francisco  Diez  

Page 25: Computer)Vision)ECE739) - McMaster University

3D  Alignment  

•  Aligning  3D  points  instead  of  2D  features.  •  “The  biggest  difference  between  2D  and  3D  coordinate  transforma;ons  is  that  the  parameteriza;on  of  the  3D  rota;on  matrix  is  not  as  straighgorward.”  

 

Page 26: Computer)Vision)ECE739) - McMaster University

Rigid  Euclidian  Mo;on  in  3D  

p=(tx,  ty,, θ)  

Page 27: Computer)Vision)ECE739) - McMaster University

Rigid  Euclidian  Mo;on  in  3D