Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2011-11-28 17:49:42 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2011-11-28 17:49:42 +0400
commit9f3c921957124d65aa0d2cbc4ad2aacb56411670 (patch)
tree1aa3e3eb139ce638afba27cc129dbfd167446728 /extern/libmv/libmv-capi.h
parent24cc4a6c2188f8143282851b19c11f0b61d41475 (diff)
Camera tracking: moved camera solver into it's own job
In some cases solving can take a while (especially when refining is used) and keeping interface locked is a bit annoying. Now camera solver is moved to job system and interface isn't locking. Reporting progress isn't really accurate, but trying to make it more linear can lead to spending more effort on it than having benefit. Also, changing status in the information line helps to understand that blender isn't hang up and solving is till working nicely. Main changes in code: - libmv_solveReconstruction now accepts additional parameters: * progress_update_callback - a function which is getting called from solver algorithm to report progress back to Blender. * callback_customdata - a user-defined context which is passing to progress_update_callback so progress can be updated in needed blender-side data structures. This parameters are optional. - Added structure MovieTrackingStats which is placed in MovieTracking structure. It's supposed to be used for displaying information about different operations (currently it's only camera solver, but can be easily used for something else in the future) in clip editor. This statistics structure is getting allocated for time operator is working and not saving into .blend file. - Clip Editor now displays statistics stored in MovieTrackingStats structure like it's done for rendering.
Diffstat (limited to 'extern/libmv/libmv-capi.h')
-rw-r--r--extern/libmv/libmv-capi.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/extern/libmv/libmv-capi.h b/extern/libmv/libmv-capi.h
index 8252a11739b..536f8a5f14c 100644
--- a/extern/libmv/libmv-capi.h
+++ b/extern/libmv/libmv-capi.h
@@ -64,10 +64,14 @@ void libmv_tracksDestroy(struct libmv_Tracks *libmv_tracks);
#define LIBMV_REFINE_PRINCIPAL_POINT (1<<1)
#define LIBMV_REFINE_RADIAL_DISTORTION_K1 (1<<2)
#define LIBMV_REFINE_RADIAL_DISTORTION_K2 (1<<4)
+
+typedef void (*reconstruct_progress_update_cb) (void *customdata, double progress, const char *message);
+
int libmv_refineParametersAreValid(int parameters);
struct libmv_Reconstruction *libmv_solveReconstruction(struct libmv_Tracks *tracks, int keyframe1, int keyframe2,
- int refine_intrinsics, double focal_length, double principal_x, double principal_y, double k1, double k2, double k3);
+ int refine_intrinsics, double focal_length, double principal_x, double principal_y, double k1, double k2, double k3,
+ reconstruct_progress_update_cb progress_update_callback, void *callback_customdata);
int libmv_reporojectionPointForTrack(struct libmv_Reconstruction *libmv_reconstruction, int track, double pos[3]);
double libmv_reporojectionErrorForTrack(struct libmv_Reconstruction *libmv_reconstruction, int track);
double libmv_reporojectionErrorForImage(struct libmv_Reconstruction *libmv_reconstruction, int image);