[37] | 1 | % By Philip Torr 2002
|
---|
| 2 | % copyright Microsoft Corp.
|
---|
| 3 | %minimize, subject to the upper 2x2 norm is 1 as described in Torr and Firzgibbon
|
---|
| 4 |
|
---|
| 5 | function f = torr_nonlinf_mincon2x2(f_init, nx1,ny1,nx2,ny2, no_matches, m3)
|
---|
| 6 |
|
---|
| 7 | %make sure it is normalized
|
---|
| 8 | f_init = f_init / sqrt(f_init(1)^2 + f_init(2)^2 + f_init(4)^2 + f_init(5)^2);
|
---|
| 9 | options = optimset('Display','off','Diagnostics','off');
|
---|
| 10 |
|
---|
| 11 | %the function torr_errf_sse takes as input f and all the extra parameters nx1,ny1,nx2,ny2, m3
|
---|
| 12 | f = fmincon('torr_errf_sse',f_init,[],[],[],[],[],[],@torr_nonlcon_f2x2,options,nx1,ny1,nx2,ny2, m3);
|
---|
| 13 | %f = fmincon('torr_errf_sse',f_init,[],[],[],[],[],[],[],options,nx1,ny1,nx2,ny2, m3)
|
---|
| 14 |
|
---|
| 15 |
|
---|
| 16 |
|
---|