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-07 16:55:18 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2011-11-07 16:55:18 +0400
commit27d42c63d9b507b1771ed5a7923c389c719b877b (patch)
tree8dd4ca61e197a7053633f62b4a5d8091957724c4 /source/blender/makesdna/DNA_movieclip_types.h
parente122dc0748f6a4d77b236e26beba93e2a9a36bf0 (diff)
Camera tracking integration
=========================== Commiting camera tracking integration gsoc project into trunk. This commit includes: - Bundled version of libmv library (with some changes against official repo, re-sync with libmv repo a bit later) - New datatype ID called MovieClip which is optimized to work with movie clips (both of movie files and image sequences) and doing camera/motion tracking operations. - New editor called Clip Editor which is currently used for motion/tracking stuff only, but which can be easily extended to work with masks too. This editor supports: * Loading movie files/image sequences * Build proxies with different size for loaded movie clip, also supports building undistorted proxies to increase speed of playback in undistorted mode. * Manual lens distortion mode calibration using grid and grease pencil * Supervised 2D tracking using two different algorithms KLT and SAD. * Basic algorithm for feature detection * Camera motion solving. scene orientation - New constraints to "link" scene objects with solved motions from clip: * Follow Track (make object follow 2D motion of track with given name or parent object to reconstructed 3D position of track) * Camera Solver to make camera moving in the same way as reconstructed camera This commit NOT includes changes from tomato branch: - New nodes (they'll be commited as separated patch) - Automatic image offset guessing for image input node and image editor (need to do more tests and gather more feedback) - Code cleanup in libmv-capi. It's not so critical cleanup, just increasing readability and understanadability of code. Better to make this chaneg when Keir will finish his current patch. More details about this project can be found on this page: http://wiki.blender.org/index.php/User:Nazg-gul/GSoC-2011 Further development of small features would be done in trunk, bigger/experimental features would first be implemented in tomato branch.
Diffstat (limited to 'source/blender/makesdna/DNA_movieclip_types.h')
-rw-r--r--source/blender/makesdna/DNA_movieclip_types.h126
1 files changed, 126 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_movieclip_types.h b/source/blender/makesdna/DNA_movieclip_types.h
new file mode 100644
index 00000000000..fc21f26fa32
--- /dev/null
+++ b/source/blender/makesdna/DNA_movieclip_types.h
@@ -0,0 +1,126 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Blender Foundation,
+ * Sergey Sharybin
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#ifndef DNA_MOVIECLIP_TYPES_H
+#define DNA_MOVIECLIP_TYPES_H
+
+/** \file DNA_movieclip_types.h
+ * \ingroup DNA
+ * \since may-2011
+ * \author Sergey Sharybin
+ */
+
+#include "DNA_ID.h"
+#include "DNA_tracking_types.h"
+
+struct anim;
+struct bGPdata;
+struct ImBuf;
+struct MovieClipProxy;
+struct MovieTrackingTrack;
+struct MovieTrackingMarker;
+
+typedef struct MovieClipUser {
+ int framenr; /* current frame number */
+ short render_size, render_flag; /* proxy render size */
+} MovieClipUser;
+
+typedef struct MovieClipProxy {
+ char dir[160]; /* custom directory for index and proxy files (defaults to BL_proxy) */
+
+ short tc; /* time code in use */
+ short quality; /* proxy build quality */
+ short build_size_flag; /* size flags (see below) of all proxies to build */
+ short build_tc_flag; /* time code flags (see below) of all tc indices to build */
+ short build_flag, pad; /* other build flags */
+ char pad2[4];
+} MovieClipProxy;
+
+typedef struct MovieClip {
+ ID id;
+
+ char name[240]; /* file path */
+
+ int source; /* sequence or movie */
+ int lastframe; /* last accessed frame number */
+ int lastsize[2]; /* size of last accessed frame */
+
+ float aspx, aspy; /* display aspect */
+
+ struct anim *anim; /* movie source data */
+ struct MovieClipCache *cache; /* cache for different stuff, not in file */
+ struct bGPdata *gpd; /* grease pencil data */
+
+ struct MovieTracking tracking; /* data for SfM tracking */
+ void *tracking_context; /* context of tracking job
+ used to synchronize data like framenumber
+ in SpaceClip clip user */
+
+ struct MovieClipProxy proxy; /* proxy to clip data */
+ int flag, pad;
+} MovieClip;
+
+typedef struct MovieClipScopes {
+ int ok; /* 1 means scopes are ok and recalculation is unneeded */
+ int track_preview_height; /* height of track preview widget */
+ struct ImBuf *track_preview; /* ImBuf displayed in track preview */
+ float track_pos[2]; /* sub-pizel position of marker in track ImBuf */
+ short track_disabled; /* active track is disabled, special notifier should be drawn */
+ char pad[2];
+ int framenr; /* frame number scopes are created for */
+ struct MovieTrackingTrack *track; /* track scopes are created for */
+ struct MovieTrackingMarker *marker; /* marker scopes are created for */
+ float slide_scale[2]; /* scale used for sliding from previewe area */
+} MovieClipScopes;
+
+/* MovieClipProxy->build_flag */
+#define MCLIP_PROXY_BUILD_UNDISTORT 1 /* build undistorted proxies as well */
+
+/* MovieClip->source */
+#define MCLIP_SRC_SEQUENCE 1
+#define MCLIP_SRC_MOVIE 2
+
+/* MovieClip->selection types */
+#define MCLIP_SEL_NONE 0
+#define MCLIP_SEL_TRACK 1
+
+/* MovieClip->flag */
+#define MCLIP_USE_PROXY (1<<0)
+#define MCLIP_USE_PROXY_CUSTOM_DIR (1<<1)
+
+/* MovieClip->render_size */
+#define MCLIP_PROXY_RENDER_SIZE_FULL 0
+#define MCLIP_PROXY_RENDER_SIZE_25 1
+#define MCLIP_PROXY_RENDER_SIZE_50 2
+#define MCLIP_PROXY_RENDER_SIZE_75 3
+#define MCLIP_PROXY_RENDER_SIZE_100 4
+
+/* MovieClip->render_flag */
+#define MCLIP_PROXY_RENDER_UNDISTORT 1
+
+#endif