From BlenderWiki

Jump to: navigation, search
Note: This is an archived version of the Blender Developer Wiki. The current and active wiki is available on wiki.blender.org.

Camera tracking integration: Weekly progress

Week 1: 23th-29th May

During this week I've been mostly busy with implementation of new DNA structures, RNA accessors, space type.

  • Initial implementation of new ID named MovieClip. Currently it has practically the same functionality as images, but this functionality would be widen in nearest future.
  • Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on).

Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations).

  • Added new theme area for Space Clip. No special colors were defined here yet.
  • Implementation of basic cache system for movies.

This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (amount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future).

  • Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything).

Thereby, I've got new ID data for movies, which could be created in special editor SpaceClip, where basic navigation are implemented, added support of playback and also added basis for adding new tracking-related tools.

Weekend would be spend on code review, possible clean-ups, minor improvements of model. And i have also think a bit about this things:

  • Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file).
  • Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed.
  • Sound isn't supported during playback in movie clip.

Plans for the next week would be to start implementing tracking-related tools like markers interaction, maybe undistortion (due to it's implemented in libmv). But I'll be still mostly focusing on tracker-library independent features due to architecture should allow changing tracking library.

Week 2: 30th May-5th June

This week I've spend on some bug tracker, ffmpeg issues, but have some progress in my GSoC project too. It's mostly related on implementing DNA structures for tracking markers, operators to handle this markers (create, delete, select, transform).

Implemented basic structures and operators for markers manipulation.

Markers contains:

  • Position of marker at frame in unified 0..1 coordinates
  • Relative positions of left-bottom and right-top corners of pattern area
  • Relative positions of left-bottom and right-top corners of search area
  • Selection flags

New operators:

  • Create new marker. It's a modal operator which creates markers at mouse position when LMB is clicking.
  • Delete selected markers.
  • Select marker using RMB. Some parts of marker (point, patter, search) could be deselected.
  • Select markers using rectangular selection.
  • Select markers using circle selection.
  • Marker translation (G-key).
  • Marker scaling (S-key).

UI changes:

  • Added mode to space clip. Currently supported modes are:
    • View mode
    • Tracking mode

This was intended to separate different categories of tools, so interface shouldn't be overheaded with plenty of tools which aren't actually using in the same time.

  • Created new panel when active tool is 'MARKER' and there's active marker where positions could be adjusted in pixel space.

Internal changes:

  • Splitted DNA/RNA movieclip files to make separation of tracking data and movie data more clear. This could be useful in the future when we'll want to support multiple movies for single camera tracking (to make tracking more accurate).
  • Added new file in blenkernel, where all tracking-related function would be stored. Not very much function here at this moment, but in the future all stuff related on converting DNA to external tracking data would be stored here.

Next week would be spent in fixing some places marked as not very nice in the code, adding animation to markers. Also I'll try to make such Blender-side things as displaying clip in 3d view. It'll be quite differ from current image backgorund due to supporting bundles and so.

Week 3: 6th-12th June

  • Disallow moving pattern/search area in way when marker position is outside of pattern area.
  • MoiveClip could be set as background for 3D view. Added background source property to BGPic to switch between image and movie. Movie is a bit more complicated entity than clip (due to displaying bundles, test objects and so) that's why i've splitted background into two sources.
  • Added Layout.template_movieclip to display general clip settings. Used in Footage panel of SpaceClip and background image properties in 3d view.
  • Display bundles in 3D view as spheres. Selection is synchronized to markers associated with this bundle. Bundle can't be selected in 3D view.
  • Recoded internal DNA structures, RNA and operators to match libmv entities. Tracking data now consists of Tracks, each tracks consists of markers which are associated with frame number. Markers holds position only, pattern and search areas settings are stored in track. Such settings should be unified for all markers in track and marker should hold position and frame number only.
  • Added missed stub for blenderplayer, so it should compile again fine.
  • libmv is added to extern/. Script for bundling needed subset of sourcses from libmv repo is included there.
  • Eigen3 is also added to extern/. libmv depends on Eigen3 (which isnt't compatible with Eigen2 from API point of view). So both of versions are going to be in worktree for time (until code which used Eigen2 would be ported to Eigen3).
  • Added some functions to libmv-capi, so some things from this library could already be used.
  • Added the very basic implementation of 2D tracking. It should be treated as draft for tracking architecture which probably would be cleaned up, changed or whatever else. Current implementation was supposed to demonstrate that our structures and understading is correct to interact with libmv easily.

There's still not serious difficulties -- just interacting with libmv team, synchronizing knowledge which sometimes is changing a lot. but it's not stoppoers for project still.

Plans for next week would be probably:

  • Clean up my first basic architecture I've implemented for tracking. Not sure what exactly would change here, but probably there's something to be changed.
  • Improve caching system, so tracking HD videos wouldn't be problem for my laptop which hasn't got bunch of memory. This would probably be related on proxies and so.
  • Improvements in 2D tracking integration. At least pattern size should be sent as traker's parameter to libmv.

Week 4: 13th-19th June

  • itasc adopted for Eigen3 library. It compiles well, but need deeper testing for regressions.
  • Removed Eigen2 library.
  • Added settings to tracker which could be changed from UI. Pattern area is now affects on tracker. Currently libmv supports square patterns which are centered to marker's position. Maximal pattern dimensions is sending to libmv as pattern size. Would be changed when libmv would support non-centered and non-square patterns.
  • Fixed bug with syncing pattern's flags when tracking.
  • Current frame in cache line became a bit more visible. It's useful for me to when debugging.
  • Changed behavior of "Add Marker" operator: not it's non-modal and places marker on mouse position at click.
  • Added macro "Add Marker and Move" which is used to place markers from toolbar button.
  • Added some utility functions to get image buffer under search and pattern area which also returns relative position of marker center for this images. Generated images are more "correct" from coords rounding POV, but re-calculation of marker position back to frame coords is more complicated and not implemented yet, so old not very accurate logic is still used.
  • Added preview widget with content of pattern area.
  • Fixed bug with marker's point going outside of pattern when scaling pattern which isn't centered to marker's position.
  • Added option to make markers thin. It's in Debug panel due to this option was really useful for debugging preview image but not sure it'll be useful for artists.
  • Added "View Selected" operator (hotkey is numpad period). Fits view to show all selection at the frame.
  • Added option "Lock to Selection" which locks view to show centered selection. Useful to visual markers tracking during playback. This option is on "Display" panel.
  • libmv's sources would now be added to qtcreator project.
  • Fixed compilation with blenderplayer enabled and cmake.
  • Fixed bug when tracking was done from frame different from initial marker's frame number.
  • Implemented backwards tracking.
  • Added option to draw track's path. Would be enabled by default for new scenes. Could be enabled on "Display" panel for files saved in previous version.
  • Added operator to clean track path so it could be easily tracked form scratch.
  • Added hotkeys for tracking, backwards tracking and cleaning track path (Ctrl-T, Ctrl-Shift-T and Alt-T).
  • Fixed crash when setting clip as a footage.
  • Small optimization when trying to track without selected markers.

Interface changes:

  • Remove all "modal" things like active tool and mode. They aren't so useful as I thought when was starting implementation of UI.
  • Toolbar (T-panel) now contains tools only, no options/properties there.
  • All properties are moved to properties panel (N-panel).

Test tool:

Convert track to location fcurves for object in 3d world. 1 pixel on footage is equal to 1 Blender unit.

NOTE: Added for testing only, could be removed any time -- real parenting to markers/bundles are only under design now.


NOTE: Files saved in previous versions of this branch could easily crash on tracking. Use "Reset To Settings" button from Tracking Settings before tracking selected markers for such files.

Plans for next week

Plans for next week: i've got some request like marker's area resizing with LMB without doing this annoying area selection and some more usability requests. Still have to investigate Peter's proxying/caching patch and implement smarter caching which currently could eat all memory. Also reconstruction could arrive soon from libmv side. Also we could start implementing real parenting of objects to tracks.

Problems

There's still no showstoppers. Maybe sometimes restrictions of Blender design, but it could be usability problems only which wouldn't really hurt workflow (like buttons refreshing during playback and so).

Week 5: 20th-26th June

  • Corrected copyrights in my new files header.
  • Added debug option to dump as PNG image content of search areas tracking between which was failed.
  • Removed internal tracking settings like pyramid level and tolerance. Weren't useful neither for me nor for artists.
  • Fixed bug in BKE_tracking_get_marker which could lead to failure of getting marker for current frame when there's marker for requested frame.
  • Fixed bug with disappearing markers after tracking for cases when marker was added at frame different from tracking start frame and tracking start frame is equal to tracking end frame.
  • Stop tracking when no markers could be tracked.
  • Changed marker selection rules:
    • If marker isn't selected, all it's areas are getting selected with mouse.
    • If marker is selected and selection type doesn't have "extend" mode (SHIFT isn't holded down) the nearest to mouse cursor area would be selected. All the rest areas would loose selection.
  • Limit number of frames which would be used in "Track Markers" operator. So now you could easily track along 10/20/etc frames.
  • Change scene current frame after "Track Markers" operator.
  • Implemented speed limitors. Now tracking could happen:
    • As fast as possible
    • With realtime speed (scene FPS)
    • With half of realtime speed
    • With quarter of realtime speed.
  • Got rid of orig_user in MovieTrackingContext and user in TrackMarkersJob. This prevents crashes when user joins some space to SpaceClip from which tracking was started.
  • Made keyframes on path bigger and do not draw keyframes for non-selected markers.

Plans for next week

  • Continue fixing bugs, typos and so.
  • Organize better workflow for 2D tracking (related on cases of disappearing pixel to track, errors in tracking and so).
  • Find time to investigate Peter's caching system. Next week should be better than current for this.
  • Need to think a bit about small re-organization of UI. Would be cool if some options would be easier to access.
  • If libmv team would be ready, start attaching o reconstruction API.

Week 6: 27th June-3d July

  • Fixed "sliding" when panning footage in high zoom. This was most noticeable near right top corner of footage.
  • Fixed 1px flickering of marker during playback with "Lock to Selection" toggled on. This was caused by precision errors. Used UI_view2d_to_region_no_clip-like offsets calculations, but in float values. Maybe there could be something smarter..
  • Implemented tarcking along single frame. Hotkey is ALT+left/right array. Also changed a bit tracking tools buttons in Tools panel.
  • Fixed "Lock to Selection" during tracking -- tracks synchronization should happen before centering view.
  • Approximate marker's position for frames, which haven't got marker for them. Use the nearest marker from left side for approximation. For frames above first marker's framenr sue first marker position.
  • Markers now could be disabled. Added checkbox to "Active Marker" panel.
  • Changes in cache line:
    • Bright line means active track has marker for frame.
    • Dark line means marker's position is approximated.
    • Yellow-less line means marker is disabled for that frames.
  • Internal changes:
    • Rename uiTemplateMarker to uiTemplateTrack.
    • Fixed some comments in movieclip.c.
    • Fixed bundle.sh script to bundle libmv: it was generating incorrect CMakeLists header.
    • Rename CLIP_OP_delete to CLIP_OT_delete_track.
    • Fixed crash when BKE_movieclip_acquire_ibuf is called with NULL user.
    • Removed unneeded checking of marker==NULL
    • Made MovieTrackingMarker structure 8-bytes aligned
    • Use writestruct rather than writedata for track markers. This allows to change MovieTrackingMarker safely.
  • Control channels which are affect on track.
  • Added color codes for path parts before current frame and after current frame.
  • Added color code for disabled marker. Color is specifying for unselected disabled marker. Color for selected marker is calculating automatically. Color for active disabled marker is equal to the enabled active marker.
  • Added "Delete Marker" operator which deletes marker for current frame only. Hotkey is Shift-Del.
  • Added MovieClip.size and MovieClip.resolution RNA properties. Use last accessed frame number to get ImBuf from sequence.
  • Added different actions for "Clear Path" operator:
    • Clear path up to current frame.
    • Clear the whole path.
    • Cleat remained part of path (for frames after current).
  • Changed buttons order and icons for tracking. New order is:
    • Track frame backwards.
    • Track sequence backwards.
    • Track sequence forwards.
    • Track frame forwards.
  • Tracks could be named now.
  • Implemented "Follow Track" constraint to "parent" objects to tracks from movie clip.
  • Added operator to create such constraint for active object using clip and track from current context.

NOTE: .blend files which are saved with previous tomato version would fail to work properly. I don't want to spend time on making that files work properly atm, so don't blame on this.

Week 7: 4th-10th July

  • Fixed bug with swapped width/height used for per-pixel cycle when disabling color channel to be used for tracking.
  • Marker preview is now using sub-pixel precision.
  • Tracking stuff uses the same imbug generation function as preview area does. Sub-pixel precision should be ok now here too.
  • Internal changes:
    • Removed TRACK_PROCESSED flag which is actually unneeded now.
    • ColaMD moved from OpenNL to extern/. It'll be needed for libmv. Also, it's a bit updated from year 1999 to 2007. Need to be tested for regressions.
    • Updated bundling script for libmv. Now it uses fuller subset of this library.
    • Bundled new libmv.
    • bundles data moved inside to MovieTrackingTrack.
    • 32 bit linux compilation should be fixed now.
  • Request from Keir: add command line argument to toggle logging stuff on. Currently, if Blender is launched with -d argument libmv would start printing logging messages. There's no argument to increase verbosity, but there's API in libmv-capi, so it'll be easy to add.
  • When libmv fails to track marker for next frame, add marker for new frame with old position and set it up as Disabled.
  • "Break" track path when markers sequence is "broken". This means path wouldn't be drawed over frames, during which tracking object was lost.
  • Update Properties Editor for SpaceClip during playback. Track preview button should now update nicely.
  • Finally fixed crash when ibuf is acquiring with user=NULL.
  • Added ActiveClip property to the scene. This clip is used as default value for new match-moving constraints.
  • Added some flags to Display panel of View3D. Related on displaying match-moving stuff.
  • Initial implementation of 3d reconstruction.
  • Added constraint "Camera Solver". This constraint is supposed to be used to make camera follow the reconstructed camera path.
  • Added "reference" property to "Follow Track" constraint. Now object could be "parented" to 2D track position or to 3D bundle position.
  • Implemented "Set Origin" operator
  • Added "Specials" W-key menu for SpaceClip. Supports such operators:
    • Enable track
    • Disable track
    • Set origin
  • Made settings for tracking be non-animatable.
  • Blender's camera now affects on reconstructed data. Bundles are "parented" to active scene camera. So now bundles' could could be scaled and rotated when camera is rotating/scaling.

Week 8: 11th-17th July

  • Internal changes:
    • Clean-up: animation data is not necessary in MovieClip. Removing.
    • Changed libmv api to use doubles instead of floats. No real benefit rather than keeping API uniform.
    • Optimized reconstructed camera search. It's optimized for playback, not random access.
    • Corrected offset of sequence images. Now first image from sequence should be at scene frame 1.
    • Fixed incorrect usage of RNA structure for CameraSolverConstraint.
    • Fixed some typos in object_constraint which were casting CameraSolver data to FollowTrack data.
    • Fixed problems with compilation blenderplayer with cmake.
    • Get rid of BKE_movieclip_approx_size. Rather than accessing to cache with previously set frame number it'll be easier to store size of last accessed in "runtime" DNA.
    • Fix for camera solver on windows.
  • Fixed bug with undefined reference for Follow Track constraint.
  • Implemented hide/show track functionality.
  • Small re-exposing Marker menu into UI. Now it's called "Track". Added new operators there.
  • Set reconstructed clip as active to scene.
  • Improved marker size/position adjustment:
  • Rollback selection model so selected parts of marker would be disabled only when "extension" click happens.
  • Implemented left mouse sliding to adjust marker position (using small square in left top corner of search area) and size of pattern/search (using small triangle it right bottom corner of marker). Pressing Shift when sliding marker with mouse makes movement more accurate.
  • Added option to show projection of bundles into footage. To see bundles "Show Bundles" from Display panel should be enabled. Used very rough limit of 3 px to consider projection is fine. Colors are still hard-coded. Not sure it could be useful to make them configurable.
  • Added option to mute footage. It could be useful to check if markers/bundles are moving smoothly.
  • Added selector for focal length units.
  • New default values for maerker pattern/search areas. This makes tracking more stable.
  • Pyramid level increased to 4. This would make tracking of blured imaged more accurate.
  • Tracking-related constraints now have got option "Use Defult Clip" which makes them use clip set as active for scene. Enabled by default.
  • Set active blender camera focal length after reconstruction
  • Search areas are hidden by default now. No big benefit of looking at them now after changing default settings to 2D tracker and pattern/search size.
  • Both of Toolshelf and Properties panels are now visible by default.
  • Move keyframes from Properties panel to Toolshelf. It is a key thing which makes reconstruction correct and this options were too hidden and not so convenient to use.
  • Added operator "Bundles To Mesh". It was a request from Sebastian and this operator creates mesh with vertices using bundles coords for vertices coordinates. A bit limited atm -- new object can't be parented to camera, so changing camera orientation would requite mesh re-creation.
  • Implemented "Set Floor" operator. It takes three is selected tracks which has got bundles and makes them parallel to scene floor. One of selected bundles (active bundle if presents) becomes scene origin, the other becomes X-axis. Guessing of this bundles could fail. Camera tries to be on positive Z half-space.
  • Implemented "Set X-axis" operator. This operator takes selected track with bundle and aligns it along X-axis. This means rotation to make Y-coord of this bundle 0 is applied.
  • If camera has got a parent, then transformation would be applient ot this parent, not to camera. Useful for configuration when Empty is used to orient camera and some related stuff in 3D space.
  • "Clear Path" now clears track for all selected markers.
  • Commited patch #24427: Editable camera sensor size (meaningful focal length units).
  • Tracking camera presets.
  • Reset principal to image center operator.
  • Enable markers on transform.
  • Initial implementaition of feature detection.
  • Fixed bug with incorrect user sync when tracking for first frame.

Week 9: 18th-24th July

  • Internal changes
    • Do not use macroses for checking the only one bit of track/marker flags.
  • Added compositor node "Movie Clip".
  • Click-and-slide behavior for placing marker. Now "workflow" of adding new marker is following:
    • Hit Ctrl+LMB
    • Release Ctrl
    • Slide mouse to give marker better position using preview widget for this.
  • Fixed bug with incorrect scale of UV project modifier when Blender camera uses non-default sensor size.
  • Track preview widget is now resizeable.
  • Marker position could now be adjusted from track preview widget.
  • Changed behavior of "Follow Track" constraint for tracks. Now tracking coordinates are mapped to plane which is parallel to camera view plane.
  • Disallow changing trasnformation mode to rotation. It's not supported for markers and it lead to crashes.
  • Added option to show tracks names and their states (disabled, keyframed, estimated, tracked).
  • Do not show bundles in 3d viewport if "Only Render" option is enabled.
  • Selected bundles are now highlighted with outline. It looks more Blender-way of highlighting selected items.
  • Added option to show bundles names in 3D viewport.
  • Bundles now could be selected from 3D viewport.
  • Tweaked "Snap Cursor To Selection" operator: If selected object is camera and there's bundles visible in viewport, snapping would use midpoint of selected bundles.
  • Option to lock tracks. Locked tracks can't be be moved, scaled, re-tracked and so.
  • Added setting for shape of bundle. Default is sphere.
  • Test feature: configurable marker colors in Clip Editor. Use presets, so plenty of different color could be defined and easily re-used.
  • Fixed crash when holding down S and R keys.
  • Fixed deleting of first marker.
  • Tracking should now work fine with float buffers.
  • Added option to show distortion grid. It's most probably temporary solution until [auto]calibration tools aren't merged. This grid defines straight lines on the image.
  • Select Inverse wouldn't select hidden parts of markers.
  • Movie Clip display aspect ratio is now available on Display panel.
  • Fixed discovered bug with selecting hidden marker areas with mouse.
  • Refactor of context structure used for 2D tracking:
    • Tracker object is now per-track. This allows to use different pyramid levels for different tracks and now search area resizing shouldn't make tracking less accurate.
    • This is also be used for new optimized libmv API.
    • This allowed to use OpenMP to track different markers in separated threads. This allowed to reach quite cool speedup for multi-core CPU.
  • Do not select "hidden" parts of marker on creation.
  • Added modifier key for marker transformation: if alt is pressed down -- pattern/search will be moving relative to marker center.
  • Changed behavior of mouse sliding:
    • To change marker position markers should be slided by it's center.
    • Left-top corners now used to offset pattern/search relative to marker center.
    • Hide mouse cursor during sliding.
  • Operator "Join Selected Tracks". This operator joins all selected tracks to active track. Hotkey is Ctrl-J.
  • Operator "Select Grouped". Now it's easy to select all locked/keyframes/etc markers. Hotkey is Shit-G.
  • Operator to jump to beginning/end of active path. Hotkeys are Shift+Ctrl+Arrow Left/Right.
  • Operator to copy color from active track to all tracks.

Week 10: 25th-31th July

  • Fixed bug with copying colors to all selected markers.
  • Hide mouse cursor when sliding from preview widget.
  • Shit-key holded down during sliding in preview area makes sliding more accurate.
  • Fixed bug with preview area refresh when disabling colors.
  • Fixed incorrect mouse sliding when resizing area which isn't symmetrical to marker's position.
  • Added "Clip" group to User Preferences -> Input.
  • Now hotkeys can be investigated there and also, they can be changed there.
  • Split clip hotkeys into two categories: global and editing. This allows to re-use such hotkeys as track markers from properties region without worrying about conflicts.
  • Anchor point could now be offseted from marker position.
  • Pattern can now be symmetrical relative to marker position only.
  • Resolved conflict caused by left-mouse selection option. Now it works perfectly with sliding -- no more "sticky" keys or so.
  • Clip Editor now could be an owner for jobs. It was useful when i've been attaching Peter's work in my local repo.
  • Fixed mouse selection to handle offset correct.
  • glog should no flood into logs files now.
  • Request from Francois - changes in sliding:
    • Anchor point is for sliding the whole marker.
    • Square on pattern moves pattern and search relative to anchor point.
    • Square on search moves search only.
  • Bundles in 3d viewport are colored by track custom color.
  • Integrated VSE proxies patch from Peter Schlaile:
    • This patch actually not solves cacheing issues, need to be solved separately.
    • Own functions to build proxies for clip are needed.
    • Currently both of movies and sequences are working through proxies. 2D tracker uses original (non-proxied) resolution
    • Some small issues with patch were discovered and sent to Peter,
  • Attempt to switch moviecache to use CacheLimiter:
    • Limiter counted mapped memory twice when was chacheing how many memory is used.
    • It was using "global" memory usage not memory usage by cached elements. It will cause big problems when there's large mesh or plenty of undo steps are in memory nothing would be cached in sequencer.
    • To solve this problem introduced "callback" to measure cached element size. It could be not very accurate in general, but it works well for image buffers. And if this callback isn't set old-school memory usage check would be used.
    • The whole cache used to get freed when memory limit exceeded, now it'll drop only as much elements as necessary to reduce memory usage.
    • Sequence cache wasn't switched to use moviecache but now it's really easy to do. When i'll be sure new caching scheme works fine.
  • 2D stabilization tools. Very basic tool based on average position of selected tracks.

Now clip editor uses as much memory for cache as it's set in User Preferences (Preferences -> System -> Sequencer -> Memory Cache Limit) which si 128Mb by default. Please do not complain about few cached frames out-of-box and just increase limit there. Caching fixed amount of frames wasn't so nice indeed.

Week 11: 1st-7th August

  • internal changes
    • Get rid of caching logic in seqcache, switch it to use logic from movie clip. Now only hash calculation and comparator functions are declared in seqcache.
    • Made naming in libmv-api more uniform.
    • Move aspect ration detection of clip to movieclip.c.
    • Remove unused width and height from camera intrinsics function.
  • Fixed bug with transforming several markers at the same time. (Memory access issue, index was chacging in wrong way).
  • Do not check result of BKE_tracking_get_marker -- it should always return valid marker.
  • Fixed occasional crash caused by conflicting access to non-threadsafe moviecache. Added lock on movie clip ibuf acquire level.
  • A bit nicer feedback from libmv when doing reconstruction. Now if all tracks and frames were reconstructed average error would be reported in "notification area". If there's something failed to be reconstructed warning message would appear and failed items would be printed to the console.
  • If "Zoom To Mouse" is enabled in user preferences then zooming would happen to mouse position in clip editor.
  • Fixed 1px padding from shot boundary rectangle.
  • Allow for some operators grab cursor.
  • Enlarge marker anchor sliding area and make it prioritized on pattern/search slide zones,
  • Do not show frame boundary border when stabilization isn't enabled.
  • Separate stabilization settings from display in clip editor. Now clip can contain stabilization data but still be displayed un-stabilized in clip editor.
  • Internal changes in stabilization:
    • Use separated location/scale parameters rather than 4x4 matrix. In some ares "decomposed" data is needed (text draw functions, i.e.). Also such decomposed data could be used in compositor.
    • MovieClip now uses own structure for cache where additional data can be stored. MovieCache structure now one of properties in this new structure.
    • Get rid of stable image buffer stored in MovieClipStabilization structure. Pre-created buffer for scaling still stored there. This helps to keep playback realtime -- re-creating this buffer introduces ~15% slowdown.
  • Added sliders to 2D stabilization panel which controls intensity of translation/scale which applies on shot.
  • Added filter type to Stabilize2D compositor node. Supports nearest, bilinear and bicubic interpolation.
  • After discussion with Sebastian and Francois added new node called Transformation. It can apply translation, rotation and scale. It's not the same thing as applying this components separately -- all transformation is happening inside "canvas". And it should be more accurate on interpolation and sub-pixel translation. Need to check order of applying translation/scale/rotation btw.
  • Added output sockets to movie clip compositor node. They holds stabilization data which can be used by Translate or Transform nodes.
  • Minor fix of UI issues in Display panel.
  • Fixed some silly things ni DNA design. Now all reconstruction data is stored in Tracking->Reconstruction. Please, re-solve your cameras -- reconstruction data wouldn't be read from files saved in blender below this commit.
  • RNA accessors for reconstruction data.
  • Store average reconstruction error in new reconstruction structure and show it in clip editor header after reconstruction.
  • Highlight failed to reconstruct frames with red in cache line.
  • Added "group" "Failed Tracks" in Select Grouped operator, Meant to be used for selecting tracks bundles from which failed to to be solved.
  • Hotkey to delete marker: Shift-X.
  • Jump to next/prev failed frame operator. Hotkeys are Ctrl-Shift-Left/Right Arrow.
  • Reconstruction should now deal correct with aspect ratio.
  • Fixed bug with resetting marker's flag for non-transforming tracks when canceling transformation.
  • Fixed bug with keyframing non-selected tracks when initializing tracking tools.
  • Changed selection policy: now invisible parts of marker can be selected.
  • Added operator redo panel to Clip Editor.
  • Set Scale operator now uses operator property for scale.
  • Added operator "Clean Tracks" which currently checks if tracks are tracked long enough and can select bad tracks, delete them or delete tracking segments which are too short.
  • Added function to calculate per-track average error. Made this in libmv c-api, probably should be ported to libmv pipeline.
  • MovieTrackingTrack now holds average reprojection error which is displayed in Active Track panel and information text in clip editor (if displaying of names are enabled).
  • Make "Clean Tracks" take average error on account.
  • Request from Sebastian/Francois: default lens for clip set to 24.0
  • Added some additional camera presets from Francois request. Not sure all things from GENERIC section of that request would be actually useful.

Week 12: 8st-14th August

  • Internal changes:
    • Do not register tracking operator in redo panel.
  • Cleanup wouldn't affect on hidden or locked tracks.
  • "Track" operator wouldn't take locked tracks into account when checking if there's something to track.
  • Fixed possible errors with non-unique naming when syncking currently tracking tracks with list of tracks used in clip.
  • Added back Scale factor for scene orientation in toolshelf. But now it's used in a bit other way -- invoke function checks if operator's property is set and if not -- value set in toolshelf is used.
  • Interpolate camera location and orientation for frames where's no reconstruction data.
  • Expose parameters for feature detection into redo panel.
  • Committed VSE-proxies patch from Peter Schlaile.
  • Initial integration of proxies into movie clip editor.
  • Added grease pencil to clip editor.
  • More accurate sliding of undistortion coefficients.
  • Changes into sensor size use case.

There was problem with vertical sensor size which can't actually affect on things due to we've got fixed image resolution. So as soon horizontal size gets defined, both of sensor height and vertical FOV is known and exposing it into UI makes things difficult to understand.

That's why vertical sensor size was dropped.

Also added pixel aspect to camera settings fo clip editor. Solver will sue this value rather than value from display aspect ratio.

This pixel aspect would be copied to render settings after solving so things should match now between footage, solving anf footage.

  • Fixing usage on incorrect pointer to get clip idblock when doing rna update functions.
  • Request from Francois: undistort grease pencil to allow manual calibration.

Only strokes made in "Cursor" space are getting undistorted, strokes made in view space are kept unchanged.

This allows to make such workflow of manual calibration:

  • Draw straight lines with GP
  • Enable Display->Manual Calibration.
  • Tweak distortion coefficients until you'll like result (straicght GP lines should match distorted footage).

Not ideal but could be nice addition for grid-only calibration until proper tools are getting ported to libmv/blender.

  • Make calibration grid "outer" boundaries always be inside frame.
  • Re-implement non-blocking behavior to grease pencil sketch mode.
  • Added new mode to GP: poly line drawing. This mode allows to draw poly-line by clicking on it's knots. In this mode user is allowed to pan/zoom to new position before placing next knot.
  • Option to hide grease pencil (Display -> Grease Pencil).
  • Added grease pencil controls to toolar.

Week 13: 15th-21th August

  • Added Mode to Clip Editor. Currently the following modes are present:
    • Tracking/Solving mode (default)
    • Reconstruction mode
    • Distortion mode
  • Hide all tools/properties which doesn't make sense in current mode.
  • Keep a look at new template template_marker. It's needed to control marker's properties, changing of which should produce new keyframe. Currently only "Enabled" property can be control. Probably all properties from "Marker" panel could go there so this template wouldn't be so specific.
  • No operators are disabled for non-their mode. It means they can be triggered from Space menu or hotkey. Need clear map operators into mode to prevent mess of poll function.
  • Added mode toggle operator.
  • Hide Marker panel and show Display panel by default.
  • Enable manual calibration by default.
  • Code clean-up:
    • Remove unused args from template_movieclip.
    • Remove C-defined "Marker" panel.
    • Move all properties from old "Marker" panel to template_marker template. This properties would be displayed if compact is set to False.
    • Remove unused DNA properties from SpaceClip.
  • Split selected and active tracks. Now track can be active but not selected. Prevents unwanted interface flippering when working in Tracking mode.
  • Added mode toggle operator.
  • Use image from nearest track's keyframe as reference for tracking. This should reduce drifting.
  • Added option to switch to new SAD tracker. This tracker doesn't support pattern with variable size (yet?) and always uses pattern 16x16px. Tracker could be choosed in Tracking Settings panel.
  • Use new Detector from libmv.
  • Auto-disable marker in mid-shot.
  • Change behavior of alternate transformation/marker sliding:
    • Update all markers from track position when sliding marker by it's left-top corner of pattern. This prevents confusing when adding offset to already tracker marker.
    • The same change was done to translation tool.
    • To switch to "offset" mode of translation tool now you should use G-key (hit it during translation). Alt key wasn't so good idea because it's quite common hotkey in linux to move windows.
    • Fixed bug with undo push and tracking operator.