~ubuntu-branches/ubuntu/saucy/blender/saucy-proposed

« back to all changes in this revision

Viewing changes to extern/libmv/libmv-capi.h

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2013-03-06 12:08:47 UTC
  • mfrom: (1.5.1) (14.1.8 experimental)
  • Revision ID: package-import@ubuntu.com-20130306120847-frjfaryb2zrotwcg
Tags: 2.66a-1ubuntu1
* Resynchronize with Debian (LP: #1076930, #1089256, #1052743, #999024,
  #1122888, #1147084)
* debian/control:
  - Lower build-depends on libavcodec-dev since we're not
    doing the libav9 transition in Ubuntu yet

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
                        int width, int height, double  x1, double  y1, double *x2, double *y2);
51
51
void libmv_regionTrackerDestroy(struct libmv_RegionTracker *libmv_tracker);
52
52
 
 
53
/* TrackRegion (new planar tracker) */
 
54
struct libmv_trackRegionOptions {
 
55
        int motion_model;
 
56
        int num_iterations;
 
57
        int use_brute;
 
58
        int use_normalization;
 
59
        double minimum_correlation;
 
60
        double sigma;
 
61
        float *image1_mask;
 
62
};
 
63
 
 
64
struct libmv_trackRegionResult {
 
65
        int termination;
 
66
        const char *termination_reason;
 
67
        double correlation;
 
68
};
 
69
 
 
70
int libmv_trackRegion(const struct libmv_trackRegionOptions *options,
 
71
                      const float *image1, int image1_width, int image1_height,
 
72
                      const float *image2, int image2_width, int image2_height,
 
73
                      const double *x1, const double *y1,
 
74
                      struct libmv_trackRegionResult *result,
 
75
                      double *x2, double *y2);
 
76
 
 
77
void libmv_samplePlanarPatch(const float *image, int width, int height,
 
78
                             int channels, const double *xs, const double *ys,
 
79
                             int num_samples_x, int num_samples_y,
 
80
                             const float *mask, float *patch,
 
81
                             double *warped_position_x, double *warped_position_y);
 
82
 
53
83
/* Tracks */
54
84
struct libmv_Tracks *libmv_tracksNew(void);
55
85
void libmv_tracksInsert(struct libmv_Tracks *libmv_tracks, int image, int track, double x, double y);
61
91
#define LIBMV_REFINE_RADIAL_DISTORTION_K1 (1<<2)
62
92
#define LIBMV_REFINE_RADIAL_DISTORTION_K2 (1<<4)
63
93
 
 
94
/* TODO: make keyframes/distortion model a part of options? */
 
95
struct libmv_reconstructionOptions {
 
96
        double success_threshold;
 
97
        int use_fallback_reconstruction;
 
98
};
 
99
 
64
100
typedef void (*reconstruct_progress_update_cb) (void *customdata, double progress, const char *message);
65
101
 
66
102
int libmv_refineParametersAreValid(int parameters);
67
103
 
68
104
struct libmv_Reconstruction *libmv_solveReconstruction(struct libmv_Tracks *tracks, int keyframe1, int keyframe2,
69
105
                        int refine_intrinsics, double focal_length, double principal_x, double principal_y, double k1, double k2, double k3,
 
106
                        struct libmv_reconstructionOptions *options, reconstruct_progress_update_cb progress_update_callback,
 
107
                        void *callback_customdata);
 
108
struct libmv_Reconstruction *libmv_solveModal(struct libmv_Tracks *tracks, double focal_length,
 
109
                        double principal_x, double principal_y, double k1, double k2, double k3,
70
110
                        reconstruct_progress_update_cb progress_update_callback, void *callback_customdata);
71
111
int libmv_reporojectionPointForTrack(struct libmv_Reconstruction *libmv_reconstruction, int track, double pos[3]);
72
112
double libmv_reporojectionErrorForTrack(struct libmv_Reconstruction *libmv_reconstruction, int track);
114
154
 
115
155
/* dsitortion */
116
156
void libmv_undistortByte(double focal_length, double principal_x, double principal_y, double k1, double k2, double k3,
117
 
                        unsigned char *src, unsigned char *dst, int width, int height, int channels);
 
157
                        unsigned char *src, unsigned char *dst, int width, int height, float overscan, int channels);
118
158
void libmv_undistortFloat(double focal_length, double principal_x, double principal_y, double k1, double k2, double k3,
119
 
                        float *src, float *dst, int width, int height, int channels);
 
159
                        float *src, float *dst, int width, int height, float overscan, int channels);
120
160
 
121
161
void libmv_distortByte(double focal_length, double principal_x, double principal_y, double k1, double k2, double k3,
122
 
                        unsigned char *src, unsigned char *dst, int width, int height, int channels);
 
162
                        unsigned char *src, unsigned char *dst, int width, int height, float overscan, int channels);
123
163
void libmv_distortFloat(double focal_length, double principal_x, double principal_y, double k1, double k2, double k3,
124
 
                        float *src, float *dst, int width, int height, int channels);
 
164
                        float *src, float *dst, int width, int height, float overscan, int channels);
125
165
 
126
166
/* utils */
127
167
void libmv_applyCameraIntrinsics(double focal_length, double principal_x, double principal_y, double k1, double k2, double k3,