source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/torr/torr_add_manual_matches.m @ 86

Last change on this file since 86 was 37, checked in by (none), 15 years ago

Added original make3d

File size: 1.2 KB
Line 
1%
2% \pao
3% \bi
4% \item {\tt matches12} matches in an $n \times 4$ array of matches $(x,y,x'y')$, in this
5% case $n$ is the number of matches.
6% \item {\tt minc} is the minimum value of $C$ for each corner.
7% \item {\tt mat12} is defined such that {\tt mat(i) = j} means corner $i$ matches to
8% corner $j$.
9% \ei
10
11%       By Philip Torr 2002
12%       copyright Microsoft Corp.
13
14
15
16function matches12 = torr_add_manual_matches(ax_handle2,ax_handle3)
17
18button1 = 1;
19button2 = 2;
20no_matches = 0;
21
22   
23while ~isempty(button1) & ~isempty(button2)
24   
25    axes(ax_handle2);
26    hold on;
27    [Xcur,Ycur,button1] = GINPUT(1);
28    plot(Xcur,Ycur, 'm+');
29   
30   
31    if ~isempty(button1)
32        axes(ax_handle3);
33        hold on
34        [Xcur2,Ycur2,button2] = GINPUT(1);
35        plot(Xcur,Ycur, 'm+');
36    end
37   
38    if (~isempty(button1) & ~isempty(button2))
39        no_matches = no_matches + 1;
40        matches12(no_matches,:) = [Xcur,Ycur,Xcur2,Ycur2];
41       
42        axes(ax_handle2); 
43       
44        u1 = Xcur2 - Xcur;
45        v1 = Ycur2 - Ycur;
46        quiver(Xcur, Ycur, u1, v1, 0);
47        text(Xcur,Ycur,num2str(no_matches),'Color','m');
48       
49    end
50   
51   
52   
53end
54
55
56hold off
57
Note: See TracBrowser for help on using the repository browser.