diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-08-18 15:10:10 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-08-18 15:10:10 +0400 |
commit | b52502cd4e962a1d88ea11a24bdc9924ae055960 (patch) | |
tree | ddc58c8e971fe3bf19a7b90805ea5bf08433f6d5 /extern | |
parent | 07017db093ffbadf1e65194f5b7ed8d61e8f2c10 (diff) |
Camera tracking integration
===========================
Stop SAD tracker when error becomes too high.
Maximal allowed error value is controlled in Tracking Settings panel.
I haven't been able to find value which will work for most of cases
so it's now quite stupid value of 0. Currently values of 2-6 gives
quite nice result, but it depends on footage.
Upcoming changes from libmv side related on returning normalized SAD
would help here. Until this, please set max_sad manually.
Diffstat (limited to 'extern')
-rw-r--r-- | extern/libmv/libmv-capi.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/extern/libmv/libmv-capi.cpp b/extern/libmv/libmv-capi.cpp index c3a0d717d12..18843e7d925 100644 --- a/extern/libmv/libmv-capi.cpp +++ b/extern/libmv/libmv-capi.cpp @@ -327,14 +327,15 @@ void libmv_SADSamplePattern(unsigned char *image, int stride, int libmv_SADTrackerTrack(unsigned char *pattern, unsigned char *image, int stride, int width, int height, double *x, double *y) { + int result; float x2, y2; - libmv::Track(pattern, image, stride, width, height, &x2, &y2); + result = libmv::Track(pattern, image, stride, width, height, &x2, &y2); *x= x2; *y= y2; - return 1; + return result; } /* ************ Tracks ************ */ |