Camera tracking integration

===========================

Another fix for MSVC.
This commit is contained in:
Sergey Sharybin 2011-08-19 15:38:11 +00:00
parent 78a2086415
commit 3c9c5b3359
2 changed files with 14 additions and 2 deletions

@ -1,3 +1,15 @@
commit 2ac7281ff6b9545b425dd84fb03bf9c5c98b4de2
Author: Matthias Fauconneau <matthias.fauconneau@gmail.com>
Date: Fri Aug 19 17:34:45 2011 +0200
Avoid symbol shadowing.
commit 2a7c3de4acc60e0433b4952f69e30528dbafe0d2
Author: Matthias Fauconneau <matthias.fauconneau@gmail.com>
Date: Fri Aug 19 17:22:47 2011 +0200
Better dragging behavior when hitting borders.
commit a14eb3953c9521b2e08ff9ddd45b33ff1f8aeafb
Author: Matthias Fauconneau <matthias.fauconneau@gmail.com>
Date: Fri Aug 19 17:12:12 2011 +0200

@ -128,9 +128,9 @@ float Track(ubyte* reference, ubyte* warped, int size, ubyte* image, int stride,
for(int i = 0; i < 2; i++) { // iterate twice per precision level
//TODO: other sweep pattern might converge better
for(int d=0; d < 6; d++) { // iterate dimension sequentially (cyclic descent)
for(float x = -step; x <= step; x+=step) { //solve subproblem (evaluate only along one coordinate)
for(float e = -step; e <= step; e+=step) { //solve subproblem (evaluate only along one coordinate)
mat32 t = m;
t.data[d] += x;
t.data[d] += e;
//TODO: better performance would also allow a more exhaustive search
SamplePattern(image,stride,t,match,size);
uint sad = SAD(reference,match,size,size);