1 | function [err, aff_err] = real_intensity(s,n) |
---|
2 | % fo = fraction of frames points are occluded. |
---|
3 | % nframes = number frames |
---|
4 | % npoints = number points |
---|
5 | % frot = fraction of 2*pi for rotation in depth. |
---|
6 | % sigma = magnitude of Gaussian error. Pt. coordinates typically range |
---|
7 | % between -1 and 1, so a reasonable setting might be .01, or .005. |
---|
8 | % s = number of samples to draw in my method. |
---|
9 | % n = number times to repeat exp. |
---|
10 | |
---|
11 | % there are a number of other parameters set in these experiments. |
---|
12 | % In motion generation, there is amount of translation (0) and in-plane rotation. |
---|
13 | % in shum there are the number of iterations to try. |
---|
14 | |
---|
15 | num_random_starts = 5; |
---|
16 | |
---|
17 | % scaled_corner_data; |
---|
18 | % M = M(:,[1:100,201:400]); |
---|
19 | |
---|
20 | test2_data; |
---|
21 | M = test2_im_data; |
---|
22 | |
---|
23 | [nr,m] = size(M); |
---|
24 | ERR = zeros(nr,m); |
---|
25 | |
---|
26 | % for i = 1:100 |
---|
27 | % norms(:,i) = [1 0 0 1]'; |
---|
28 | % end |
---|
29 | % for k = 1:10 |
---|
30 | % for i = 1:10 |
---|
31 | % norms(:,100 + (k-1)*20 + i) = [0 1 0 1]'; |
---|
32 | % end |
---|
33 | % for i = 11:20 |
---|
34 | % norms(:,100 + (k-1)*20 + i) = [0 0 1 1]'; |
---|
35 | % end |
---|
36 | % end |
---|
37 | |
---|
38 | for i = 1:432 |
---|
39 | norms(:,i) = [1 0 0 1]'; |
---|
40 | end |
---|
41 | |
---|
42 | for j = 1:n |
---|
43 | |
---|
44 | % INC = rand(nr,m) > fo; |
---|
45 | INC = (test2_im_data > -.8); |
---|
46 | |
---|
47 | if rem(j,1000)==0 |
---|
48 | [e, a] = compare_affine(M,INC,3,ERR,norms,s,num_random_starts); |
---|
49 | err = [err', e']' |
---|
50 | aff_err = [aff_err', a']' |
---|
51 | else |
---|
52 | [e, a] = compare_affine(M,INC,3,ERR,norms,s,num_random_starts); |
---|
53 | err = [err', e']'; |
---|
54 | aff_err = [aff_err', a']'; |
---|
55 | end |
---|
56 | end |
---|
57 | |
---|