cv1, exercise 3 - tu dresdends24/lehre/cv1_ws_2013/cv1ex3_ws_2013.… · compute vision : exercise...

17
Computer Vision Exercise 3 – Panorama Stitching Compute Vision : Exercise 3 – Panorama Stitching 09/12/2013

Upload: others

Post on 01-Jun-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CV1, Exercise 3 - TU Dresdends24/lehre/cv1_ws_2013/cv1ex3_ws_2013.… · Compute Vision : Exercise 3 –Panorama Stitching 09/12/2013 16. Some suggestions, hints, other possible works

Computer Vision

Exercise 3 – Panorama Stitching

Compute Vision : Exercise 3 – Panorama Stitching

09/12/2013

Page 2: CV1, Exercise 3 - TU Dresdends24/lehre/cv1_ws_2013/cv1ex3_ws_2013.… · Compute Vision : Exercise 3 –Panorama Stitching 09/12/2013 16. Some suggestions, hints, other possible works

The task

09/12/2013Compute Vision : Exercise 3 – Panorama Stitching 2

Page 3: CV1, Exercise 3 - TU Dresdends24/lehre/cv1_ws_2013/cv1ex3_ws_2013.… · Compute Vision : Exercise 3 –Panorama Stitching 09/12/2013 16. Some suggestions, hints, other possible works

Pipeline

1. Interest point detector: Harris, Scale-space analysis, Edge detection, MSER-s …

2. Image features: Patches (squared distance, correlation coefficients), SIFT, SURF, moments, geometric features, affine invariance, projective invariance …

3. Matching: brute force + cross-validation, marriage problem …

4. Homography estimation: RANSAC (OpenCV), other RANSAC-variants, robust optimization …

5. Rendering

09/12/2013Compute Vision : Exercise 3 – Panorama Stitching 3

Page 4: CV1, Exercise 3 - TU Dresdends24/lehre/cv1_ws_2013/cv1ex3_ws_2013.… · Compute Vision : Exercise 3 –Panorama Stitching 09/12/2013 16. Some suggestions, hints, other possible works

Harris detector

09/12/2013Compute Vision : Exercise 3 – Panorama Stitching 4

1. Computation of coefficients

2. Smoothing – integral image, separable Gaussian kernel

3. Non-maxima suppression

4. Some post-processing

Page 5: CV1, Exercise 3 - TU Dresdends24/lehre/cv1_ws_2013/cv1ex3_ws_2013.… · Compute Vision : Exercise 3 –Panorama Stitching 09/12/2013 16. Some suggestions, hints, other possible works

Matching

Here:

squared difference of image patches, brute force comparison, cross-validation

Other possibilities:

Features – correlation coefficients, SIFT, explicit color correction (iterative)

Matching – marriage problem …

09/12/2013Compute Vision : Exercise 3 – Panorama Stitching 5

Page 6: CV1, Exercise 3 - TU Dresdends24/lehre/cv1_ws_2013/cv1ex3_ws_2013.… · Compute Vision : Exercise 3 –Panorama Stitching 09/12/2013 16. Some suggestions, hints, other possible works

Homography estimation

Here:

1. RANSAC (OpenCV implementation)

2. Estimation of two homographies (needed for rendering)

09/12/2013Compute Vision : Exercise 3 – Panorama Stitching 6

Page 7: CV1, Exercise 3 - TU Dresdends24/lehre/cv1_ws_2013/cv1ex3_ws_2013.… · Compute Vision : Exercise 3 –Panorama Stitching 09/12/2013 16. Some suggestions, hints, other possible works

Rendering

Standard (OpenCV) – left to right and vice versa

Symmetric:

09/12/2013Compute Vision : Exercise 3 – Panorama Stitching 7

Page 8: CV1, Exercise 3 - TU Dresdends24/lehre/cv1_ws_2013/cv1ex3_ws_2013.… · Compute Vision : Exercise 3 –Panorama Stitching 09/12/2013 16. Some suggestions, hints, other possible works

Problems – homogenous areas

09/12/2013Compute Vision : Exercise 3 – Panorama Stitching 8

Interest points are found on textured regions only

Page 9: CV1, Exercise 3 - TU Dresdends24/lehre/cv1_ws_2013/cv1ex3_ws_2013.… · Compute Vision : Exercise 3 –Panorama Stitching 09/12/2013 16. Some suggestions, hints, other possible works

Problems – small overlap

Not enough matches – very coarse allignment

09/12/2013Compute Vision : Exercise 3 – Panorama Stitching 9

Page 10: CV1, Exercise 3 - TU Dresdends24/lehre/cv1_ws_2013/cv1ex3_ws_2013.… · Compute Vision : Exercise 3 –Panorama Stitching 09/12/2013 16. Some suggestions, hints, other possible works

Problem – different colors

Original:

Interest points – Ok.

09/12/2013Compute Vision : Exercise 3 – Panorama Stitching 10

Page 11: CV1, Exercise 3 - TU Dresdends24/lehre/cv1_ws_2013/cv1ex3_ws_2013.… · Compute Vision : Exercise 3 –Panorama Stitching 09/12/2013 16. Some suggestions, hints, other possible works

Problem – different colors

Matches –obviously too few

09/12/2013Compute Vision : Exercise 3 – Panorama Stitching 11

Page 12: CV1, Exercise 3 - TU Dresdends24/lehre/cv1_ws_2013/cv1ex3_ws_2013.… · Compute Vision : Exercise 3 –Panorama Stitching 09/12/2013 16. Some suggestions, hints, other possible works

Problem – different colors

Panorama – the homographies are wrong

09/12/2013Compute Vision : Exercise 3 – Panorama Stitching 12

Page 13: CV1, Exercise 3 - TU Dresdends24/lehre/cv1_ws_2013/cv1ex3_ws_2013.… · Compute Vision : Exercise 3 –Panorama Stitching 09/12/2013 16. Some suggestions, hints, other possible works

Assignments• You have the code and the images, play with it – change the parameters,

introduce image distortions, identify problems …

• You are allowed to use the code, you can replace its parts (or even completely) by OpenCV functions or by your own implementations

• There should be at least one step (function) in the whole pipeline implemented by yourself !!! Note: own solutions for the 2nd exercise (e.g. Harris detector, filtering etc.) will be not considered as solutions for this one – something new should be done for this exercise as well

• Address problems considered above e.g. colors, homogenous regions etc. – think what steps could be improved (and how) in order to reach better performance

• Address the pipeline steps – think how to do them generally better

09/12/2013Compute Vision : Exercise 3 – Panorama Stitching 13

Page 14: CV1, Exercise 3 - TU Dresdends24/lehre/cv1_ws_2013/cv1ex3_ws_2013.… · Compute Vision : Exercise 3 –Panorama Stitching 09/12/2013 16. Some suggestions, hints, other possible works

Assignments

All the stuff is available under

http://www.inf.tu-dresden.de/index.php?node_id=2091&ln=de

Note: the address is new !!!

Deadline – 06.01.2014 per e-mail an Dmytro.Shlezinger@...

Add-ons (extra points):

1. Stereo – estimate the fundamental matrix instead of the homography

2. Competition – some images with ground truth (known homography) will be available in short, the best implementation gets +1 point

09/12/2013Compute Vision : Exercise 3 – Panorama Stitching 14

Page 15: CV1, Exercise 3 - TU Dresdends24/lehre/cv1_ws_2013/cv1ex3_ws_2013.… · Compute Vision : Exercise 3 –Panorama Stitching 09/12/2013 16. Some suggestions, hints, other possible works

Some suggestions, hints, other possible works …

Let some “approximate” homography be known. What it can be useful for?

You can adjust image coloring in order to achieve better dissimilarity measure for patches (since you know the “true” matches)

You can (drastically) reduce the search space for estimation of the matches from interest points, i.e. do not compare all to all. If so, you can use much more interest points without to essentially increase the time complexity

09/12/2013Compute Vision : Exercise 3 – Panorama Stitching 15

Page 16: CV1, Exercise 3 - TU Dresdends24/lehre/cv1_ws_2013/cv1ex3_ws_2013.… · Compute Vision : Exercise 3 –Panorama Stitching 09/12/2013 16. Some suggestions, hints, other possible works

Some suggestions, hints, other possible works …

How to make use of this ?

Apply an iterative procedure:

1. “Standard” pipeline (i.e. with the original images and less interest points) → initial homography estimation 𝐻0

2. Use 𝐻0 to correct colorings, reduce search space …

3. Perform “standard” pipeline (taking into account the current homography 𝐻𝑡) to improve 𝐻𝑡 → 𝐻𝑡+1

4. Iterate 2 – 3 until convergence

09/12/2013Compute Vision : Exercise 3 – Panorama Stitching 16

Page 17: CV1, Exercise 3 - TU Dresdends24/lehre/cv1_ws_2013/cv1ex3_ws_2013.… · Compute Vision : Exercise 3 –Panorama Stitching 09/12/2013 16. Some suggestions, hints, other possible works

Some suggestions, hints, other possible works …Another way – use resolution pyramid

1. Scale down the images

2. Estimate the homography for downscaled images

3. Use this homography to estimate the one for the originals

4. Use this estimation to adjust colorings (speed up the matching etc.) for the original images

Some other possible works:

Just accelerate all the stuff (especially the rendering can be essentially improved)

Extend the approach for more than two images

09/12/2013Compute Vision : Exercise 3 – Panorama Stitching 17