- 快召唤伙伴们来围观吧
- 微博 QQ QQ空间 贴吧
- 文档嵌入链接
- 复制
- 微信扫一扫分享
- 已成功复制到剪贴板
Panorama Stitching
展开查看详情
1 . CS131 Panoramic Image S1tching Yuke Zhu 24-‐Oct-‐14 PA1 Session 1 18-Oct-13
2 . Agenda • Objec1ve • Main flow • Skeleton code • Results
3 . Objec1ve Mul1ple images into one panorama!
4 . Main Flow (u1, u2, . . . , u128) (v1,v2,...,v128) • Detect key points • Build the SIFT descriptors • Match SIFT descriptors • FiTng the transforma1on • RANSAC
5 . Main Flow • Detect key points
6 .Key Points Detec1on PA1 Session 5 18-Oct-13
7 . Skeleton Code • Detect key points (Done for you!) -‐Under KeypointDetect [feature, DoG pyr, Gaussian pyr] = detect_features(input image) Tips addpath(‘KeypointDetect’); help detect_features
8 . Main Flow (u1, u2, . . . , u128) (v1,v2,...,v128) • Detect key points • Build the SIFT descriptors Jiayuan Ma PA1 Session 7 18-‐Oct-‐13
9 .Build the SIFT Descriptors
10 . Skeleton Code • Build the SIFT descriptors -‐ Read this paper hcp://www.cs.ubc.ca/~lowe/papers/ijcv04.pdf first! • Input -‐ Gaussian pyramid -‐ key point loca1on -‐ key point scale index • Output -‐ A set of 128-‐dimensional vectors Jiayuan Ma PA1 Session 9 18-‐Oct-‐13
11 . Skeleton Code • Build the SIFT descriptors (30 lines of code) -‐ Compute gradient magnitude and orienta1on -‐ For each key point • Find a patch (tricky round-‐off) • Compute orienta1on of the patch • Build the histogram (edge case) descriptors = SIFTDescriptor(pyramid, keyPtLoc, keyPtScale)
12 . Main Flow (u1, u2, . . . , u128) (v1,v2,...,v128) • Detect key points • Build the SIFT descriptors • Match SIFT descriptors
13 . Match SIFT Descriptors • Euclidean distance between descriptors
14 . Skeleton Code • Match SIFT descriptors (6 lines of code) -‐ Input: D1, D2, thresh (default 0.7) -‐ Output: match [D1’s index, D2’s index] -‐ Try to use one for loop -‐ Useful command • repmat • sort match = SIFTSimpleMatcher(descriptor1, descriptor2, thresh)
15 . Main Flow (u1, u2, . . . , u128) (v1,v2,...,v128) • Detect key points • Build the SIFT descriptors t11 t12 t13 • Match SIFT descriptors T = t21 t22 t23 • FiTng the transforma1on 0 0 1
16 . FiTng the transforma1on • 2D transforma1ons
17 . Skeleton Code • Fit the transforma1on matrix h11 h12 h13 H = h21 h22 h23 0 0 1 • Six variables -‐ each point give two equa1ons -‐ at least three points x2 x1 • Least squares y 2 = H y 1 1 1 H = ComputeAffineMatrix( Pt1, Pt2 )
18 . Main Flow (u1, u2, . . . , u128) (v1,v2,...,v128) • Detect key points • Build the SIFT descriptors • Match SIFT descriptors • FiTng the transforma1on • RANSAC
19 . RANSAC • A further refinement of matches
20 . Skeleton Code • RANSAC -‐ ComputeError H = RANSACFit(p1, p2, match, maxIter, seedSetSize, maxInlierError, goodFitThresh )
21 . Main Flow (u1, u2, . . . , u128) (v1,v2,...,v128) • Detect key points • Build the SIFT descriptors • Match SIFT descriptors • FiTng the transforma1on • RANSAC
22 . Image S1tching • Almost done for you • Mul1ple S1tch (2 lines of code) -‐ A simplified case of real-‐world scenario -‐ Transforma1on is associa1ve and inver1ble -‐ Useful command • pinv T = makeTransformToReferenceFrame(i_To_iPlusOne_Transform, currentFrameIndex, refFrameIndex)
23 . Tips • Help -‐ Use “help” command to learn how func1ons work • Tester.m -‐ Scripts that help you to get started • Evaluate.m -‐ Scripts that tests your solu1on • Load fixed input from checkpoint • Run your implementa1on • Compare results with reference solu1on
24 . Requirement • Due Date: 5pm Oct 31, 2014 • Electronic submission only -‐ cs131a2014@gmail.com • Code + Report -‐ SIFT invariance and why it helps -‐ DoG v.s. Dense SIFT -‐ Why RANSAC -‐ Your own s1tches -‐ Error discussion
25 .Results
26 .Results