Revision: 47652
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=47652
Author:   keir
Date:     2012-06-09 19:22:39 +0000 (Sat, 09 Jun 2012)
Log Message:
-----------
Change libmv's bilinear sampling to assume the same pixel
conventions as Blender. This fixes the preview widget, and
should make tracking slightly more accurate.

Modified Paths:
--------------
    branches/soc-2011-tomato/extern/libmv/libmv/image/sample.h

Modified: branches/soc-2011-tomato/extern/libmv/libmv/image/sample.h
===================================================================
--- branches/soc-2011-tomato/extern/libmv/libmv/image/sample.h  2012-06-09 
18:58:51 UTC (rev 47651)
+++ branches/soc-2011-tomato/extern/libmv/libmv/image/sample.h  2012-06-09 
19:22:39 UTC (rev 47652)
@@ -59,6 +59,10 @@
   int x1, y1, x2, y2;
   float dx, dy;
 
+  // Take the upper left corner as integer pixel positions.
+  x -= 0.5;
+  y -= 0.5;
+
   LinearInitAxis(y, image.Height(), &y1, &y2, &dy);
   LinearInitAxis(x, image.Width(),  &x1, &x2, &dx);
 
@@ -78,6 +82,10 @@
   int x1, y1, x2, y2;
   float dx, dy;
 
+  // Take the upper left corner as integer pixel positions.
+  x -= 0.5;
+  y -= 0.5;
+
   LinearInitAxis(y, image.Height(), &y1, &y2, &dy);
   LinearInitAxis(x, image.Width(),  &x1, &x2, &dx);
 

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to