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 |
|
---|
16 | function matches12 = torr_add_manual_matches(ax_handle2,ax_handle3)
|
---|
17 |
|
---|
18 | button1 = 1;
|
---|
19 | button2 = 2;
|
---|
20 | no_matches = 0;
|
---|
21 |
|
---|
22 |
|
---|
23 | while ~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 |
|
---|
53 | end
|
---|
54 |
|
---|
55 |
|
---|
56 | hold off
|
---|
57 |
|
---|
Note: See
TracBrowser
for help on using the repository browser.