Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

changes two of the demo images

  • Loading branch information...
commit df9485f97108533299ff024c154d6ce0a3f3d61b 1 parent 95e82e0
Andrea Vedaldi authored July 19, 2011
BIN  data/a.jpg
BIN  data/b.jpg
7  docsrc/imdisttf.html
@@ -67,9 +67,10 @@
67 67
  <img src="%pathto:root;demo/imdisttf_neigh.jpg"/>
68 68
  <div class="caption">
69 69
   <span class="content">
70  
-   The distance to the closest edge element (left) and arrows
71  
-   connecting pixels to their closest edge element (right). Figure
72  
-   generated by <code>vl_demo_imdisttf</code>.
  70
+   The distance <code>sqrt(distanceTransform)</code> to the closest
  71
+   edge element (left) and arrows connecting pixels to their closest
  72
+   edge element (right). Figure generated
  73
+   by <code>vl_demo_imdisttf</code>.
73 74
   </span>
74 75
  </div>
75 76
 </div>
6  docsrc/sift.html
@@ -112,10 +112,10 @@ <h1 id="tut.sift.match">Basic matching</h1>
112 112
 
113 113
 <div class="figure">
114 114
  <img src="%pathto:root;demo/sift_match_1.jpg"/>
  115
+ <img src="%pathto:root;demo/sift_match_2.jpg"/>
115 116
  <div class="caption">
116  
-  Matching of SIFT descriptors with <code>vl_ubcmatch</code>. Notice
117  
-  that SIFT is able to cope with a large change in scale and image
118  
-  rotation.
  117
+  Top: A pair of images of the same scene. Bottom: Matching of SIFT
  118
+  descriptors with <code>vl_ubcmatch</code>.
119 119
  </div>
120 120
 </div>
121 121
 
4  toolbox/demo/vl_demo_imdisttf.m
@@ -2,7 +2,7 @@
2 2
 
3 3
 % load image
4 4
 im = imread(fullfile(vl_root, 'data', 'a.jpg')) ;
5  
-im = im(1:100,1:100,:) ;
  5
+im = im(100:200,100:200,:) ;
6 6
 imSize = [size(im,1) size(im,2)] ;
7 7
 
8 8
 % creates an edge map
@@ -26,7 +26,7 @@
26 26
 figure(2) ; clf ; imagesc(edges) ; axis off image ;
27 27
 figure(3) ; clf ; imagesc(edges) ; axis off image ;
28 28
 hold on ; h = quiver(u,v,u_-u,v_-v,0) ; colormap gray ;
29  
-figure(4) ; clf ; imagesc(distanceTransform) ; axis off image ;
  29
+figure(4) ; clf ; imagesc(sqrt(distanceTransform)) ; axis off image ;
30 30
 
31 31
 figure(1) ; vl_demo_print('imdisttf_src') ;
32 32
 figure(2) ; vl_demo_print('imdisttf_edge') ;
26  toolbox/demo/vl_demo_sift_match.m
@@ -10,19 +10,7 @@
10 10
 % --------------------------------------------------------------------
11 11
 
12 12
 Ia = imread(fullfile(vl_root,'data','a.jpg')) ;
13  
-
14  
-th = pi/4 ;
15  
-sc = 4 ;
16  
-c = sc*cos(th) ;
17  
-s = sc*sin(th) ;
18  
-A = [c -s; s c] ;
19  
-T = [- size(Ia,2) ; - size(Ia,1)]  / 2 ;
20  
-
21  
-tform = maketform('affine', [A, A * T - T ; 0 0  1]') ;
22  
-Ib = imtransform(Ia,tform,'size',size(Ia), ...
23  
-                 'xdata', [1 size(Ia,2)], ...
24  
-                 'ydata', [1 size(Ia,1)], ...
25  
-                 'fill', 255);
  13
+Ib = imread(fullfile(vl_root,'data','b.jpg')) ;
26 14
 
27 15
 % --------------------------------------------------------------------
28 16
 %                                           Extract features and match
@@ -39,6 +27,11 @@
39 27
 
40 28
 figure(1) ; clf ;
41 29
 imagesc(cat(2, Ia, Ib)) ;
  30
+axis image off ;
  31
+vl_demo_print('sift_match_1', 1) ;
  32
+
  33
+figure(2) ; clf ;
  34
+imagesc(cat(2, Ia, Ib)) ;
42 35
 
43 36
 xa = fa(1,matches(1,:)) ;
44 37
 xb = fb(1,matches(2,:)) + size(Ia,2) ;
@@ -47,12 +40,11 @@
47 40
 
48 41
 hold on ;
49 42
 h = line([xa ; xb], [ya ; yb]) ;
50  
-set(h,'linewidth', 2, 'color', 'b') ;
  43
+set(h,'linewidth', 1, 'color', 'b') ;
51 44
 
52 45
 vl_plotframe(fa(:,matches(1,:))) ;
53 46
 fb(1,:) = fb(1,:) + size(Ia,2) ;
54 47
 vl_plotframe(fb(:,matches(2,:))) ;
55  
-axis equal ;
56  
-axis off  ;
  48
+axis image off ;
57 49
 
58  
-vl_demo_print('sift_match_1', 1) ;
  50
+vl_demo_print('sift_match_2', 1) ;
4  toolbox/demo/vl_demo_sift_vs_ubc.m
@@ -33,8 +33,8 @@
33 33
 imagesc(im) ; colormap(gray(256)) ; hold on ;
34 34
 vl_plotframe(f1, 'linewidth', 3, 'color', 'r') ;
35 35
 vl_plotframe(f2, 'linewidth',  1, 'color', 'b') ;
36  
-axis off ;
37  
-vl_demo_print('sift_vs_ubc_1') ;
  36
+axis image off ;
  37
+vl_demo_print('sift_vs_ubc_1', 0.7) ;
38 38
 
39 39
 figure(2) ; clf ;
40 40
 pie(h) ;

0 notes on commit df9485f

Please sign in to comment.
Something went wrong with that request. Please try again.