Commit Graph

83 Commits

Author SHA1 Message Date
ca927b5771 Fixed typo in tracking context creation. Wasn't harmful because because of definition value,
but better avoid such confusing assignment.
2012-02-01 19:36:39 +00:00
2f90477272 Camera tracking: regression fixed after recent frame postprocessing refactor
No-proxied frames using for 2D tracking used to be putting to cache which lead
to extra memory usage which shouldn't happen.
2012-02-01 19:06:21 +00:00
bcbe9ca5fc Color channels used for tracking is now a part of default tracking settings and also a part of presets. 2012-01-26 15:33:16 +00:00
bce89860f5 Various fixes for camera tracking stuff
- Fixed tooltip displaying for track sequence forwards in clip editor
- Corrected detection of 8 tracks so it wouldn't count tracks disabled
  on keyframes.
- Scale track preview to actual track widget size instead of scaling the
  whole preview image with given zoom ratio, so no extra memory needed to
  store zoomed margin would be used.
- Track's statistics text will fit pattern position instead of search if
  marker is disabled on current frame.
- Fixed toggle selection operator if selected track is hidden due to
  "Hide Disabled" policy.
2012-01-25 13:37:11 +00:00
128741a02e Fix typo in camera reconstruction context creation.
Thanks to Lockal to pointing out!
2012-01-25 09:27:18 +00:00
1c33126cf5 Fix #29975: Track Preview color channels not filtering correctly
Typo in checking bitflags
2012-01-24 12:25:03 +00:00
91835abde4 Remove unused code and code sued for debug 2012-01-15 13:32:07 +00:00
f37d1b7b4e Color channels now can be disabled for the whole frame in clip editor 2012-01-15 13:31:58 +00:00
fca385ca9a - opengl render in quadview wasn't using camera.
- minor change to FTOCHAR use.
2012-01-14 11:21:00 +00:00
e10fd04db0 use BLI_strncpy and BLI_snprintf when the size of the string is known.
fix for sequencer unique naming which was missed with string length update.
2012-01-11 12:33:51 +00:00
51bada696f Longer names support for all ID and other object names
This commit extends limit of ID and objects to 64 (it means 63 meaning
characters and 1 for zero-terminator). CustomData layers names are also
extended.
Changed DNA structures and all places where length constants were hardcoded.

All names which are "generating" from ID block should be limited by MAX_ID_NAME-2,
all non-id names now has got own define called MAX_NAME which should be used all
over for non-id names to make further name migration stuff easier.

All name fields in DNA now have comment with constant which corresponds to
hardcoded numeric value which should make it easier to further update this
limits or even switch to non-hardcoded values in DNA.

Special thanks to Campbell who helped figuring out some issues and helped a lot
in finding all cases where hardcoded valued were still used in code.

Both of forwards and backwards compatibility is stored with blender versions newer
than January 5, 2011. Older versions had issue with placing null-terminator to
DNA strings on file load which will lead to some unpredictable behavior or even
crashes.
2012-01-11 08:51:06 +00:00
0e4f4acc2f comment unused vars 2012-01-09 22:18:04 +00:00
5bf5d5a844 Camera tracking: tracks copy/paste operator
This commit implements basic clipboard support for movie tracking data
int clip editor. Used own implementation of clipboard like it's done
for sequencer.
Ideally it needed to be switched to more general clipboard system, but
currently this system is designed for text data only and it need to
be re-designed itself. But this feature is quite useful since object
tracking is implemented, so it should be OK to live with such own
implementation for a while.
2012-01-09 20:18:48 +00:00
a69904aefe Camera tracking: improvements of python api
- marker_find_frame moved to MovieTrack.markers and called find_frame
- Added MovieTrack.markers.insert_frame to insert marker at specified frame
- Added MovieTrack.markers.delete_frame to delete marker from specified frame
2012-01-09 20:18:28 +00:00
a4604c457d Camera tracking: more accurate track preview widget
- Added 1px extra margin to deal with bicubic interpolation nicely
- Code should be a bit more clear now
2012-01-04 15:25:43 +00:00
3bb3d46ccf Code cleanup: do not use check for nan when doing check for finite due to
finite() would be FALSE in case of nan to.

Thanks to Campbell for this information.
2011-12-31 11:03:32 +00:00
59b406ce73 Minor code cleanup after resolving conflicts 2011-12-31 09:30:39 +00:00
65c74f1570 workaround for error building with clang and quiet some warnings building without libmv. 2011-12-31 03:01:18 +00:00
792452a7e5 Disable markers when doing frame-by-frame tracking and tracker library returns failure 2011-12-30 18:15:44 +00:00
3c6e818b22 Object tracking integration
This commits merges object tracking implementation from tomato branch.

Summarized changes from branch:

- Added list of objects to be tracked. Default there's only one object called
  "Camera" which is used for solving camera motion. Other objects can be added
  and each of them will have it;s own list of tracks. Only one object can be used
  for camera solving at this moment.
- Added new constraint called "Object Tracking" which makes oriented object be
  moving in the save way as solved object motion.
- Scene orientation tools can be used for orienting object to bundles.
- Object has got scale to define "depth" in camera space.
- All tools which works with list of tracks or reconstruction data now
  gets that lists from active editing object.
- All objects and their tracking data are available via python api.
- Improvements in witness cameras workflow,
2011-12-30 18:06:02 +00:00
c21cfb4fcd Camera tracking: improvements of track preview widget
- Enable bicybic filtering fir image displayed in track preview
- Option to show grayscale content of track preview
- When some channels are disabled, display exactly the same
  content of preview image which is sending to tracker library.

Merged from tomato branch using command:
    svn merge -r42382:42383 -r42384:42385 -r42394:42395 \
	    -r42397:42398 -r42398:42399 -r42406:42407 \
		-r42410:42411 -r42417:42418 -r42471:42472 \
		^/branches/soc-2011-tomato
2011-12-30 10:20:29 +00:00
90760b9f87 Fixed low boundary when detecting frames range for camera solver 2011-12-30 08:40:36 +00:00
7c5c256fd5 Fix #29729: Blender crashes when camera solving with a disabled marker
Stupid mistake in index of last marker when detecting frames bounds
2011-12-30 08:34:00 +00:00
c2ae77e5bd Merging r42896 through r42944 from trunk into soc-2911-tomato 2011-12-28 18:31:32 +00:00
6963e43148 More fixes for timecode usage with BKE_movieclip_get_ibuf_flag 2011-12-27 11:09:06 +00:00
0ac3ab752f Fix #29688: Timecode is not used in tracking
Use proper timecode flags sending to BKE_movieclip_get_ibuf_flag function,
so now frames for tracking would be full-resolution but calculated using
timecode defined in th interface,
2011-12-27 10:52:23 +00:00
4d7c44717a Code cleanup: fix some clang static checker warnings. 2011-12-22 20:29:44 +00:00
1dc74acc12 Object tracking: configurable scale for object solution
Added slider to define scale of object solution which is used to define
"depth" of object relative to camera position. This slider effects on all
"users" of object solution such as bundles display, constrained objects and so.

Added new operator called "Set Solution Scale" to set real scale for object
solution based on real distance between two bundles reconstructed for this object.

New slider and operator can be found on "Object" panel in toolbox when in
reconstruction mode and active tracking object isn't a camera.
2011-12-19 15:12:33 +00:00
737648a0bf Merging r42648 through r42722 from trunk into soc-2011-tomato 2011-12-19 10:39:40 +00:00
74a1123059 Quite some compiler warnings... 2011-12-17 16:22:08 +00:00
3311164b24 Math lib: matrix multiplication order fix for two functions that were
inconsistent with similar functions & math notation:

mul_m4_m4m4(R, B, A) => mult_m4_m4m4(R, A, B)
mul_m3_m3m4(R, B, A) => mult_m3_m3m4(R, A, B)

For branch maintainers, it should be relatively simple to fix things manually,
it's also possible run this script after merging to do automatic replacement:
http://www.pasteall.org/27459/python
2011-12-16 19:53:12 +00:00
e534af906a Object tracking: various fixes and improvements
- Bundles selection is now available for object's bundles
- If bundles selection wasn't changed in 3D viewport, fallback to regular
  object selection, so objects behind bundles can be selected
- Snap cursor to selection now respects object's bundle selection
- Object and rack name now can be selected from list in constraint settings
- Added preset for tracks used for object tracking
2011-12-15 16:10:49 +00:00
535aee820b Merging r42602 through r42620 from trunk into soc-2011-tomato 2011-12-14 06:12:20 +00:00
6c90a192c6 Do not switch to safe malloc if tracking sequence
Malloc is getting to be safe on sequence tracking by the jobs system,
so no additional set up are necessary.

This hopefully fixes crash on OSX with OpenMP enabled when compiling by older gcc
2011-12-13 16:37:52 +00:00
b865c0314f Merging r42533 through r42601 from trunk into soc-2011-tomato 2011-12-13 11:58:59 +00:00
8b6100aa26 Fixed crash when tracking several tracks manually
Crash was caused by non-threadsafe guarded allocatio which becomes
threadsafe only when thread was started using BLI_threads module.
2011-12-13 10:07:22 +00:00
3717a4a9e1 Merging r42482 through r42532 from trunk into soc-2011-tomato 2011-12-09 10:02:01 +00:00
d568f56f18 Merging remained part of hybrid tracker which adds correlation threshold
Keir's comment:
  Add support for detecting tracking failure in the ESM tracker component of
  libmv. Since both KLT and Hybrid rely on ESM underneath, KLT and Hybrid now
  have a minimum correlation setting to match. With this fix, track failures
  should get detected quicker, with the issue that sometimes the tracker will
  give up too easily. That is fixable by reducing the required correlation (in
  the track properties).

Command used for merge: svn merge -r 42396:42397 -r 42399:42400 ^/branches/soc-2011-tomato
2011-12-07 14:54:03 +00:00
dbc9227a32 Disable markers when doing frame-by-frame tracking and tracker library returns failure 2011-12-07 11:02:34 +00:00
91796ab630 Tracks which were moved to close to boundary weren'haven't been disabled when doing
frame-by-frame tracking.
2011-12-07 10:53:51 +00:00
62fc8f5197 Make Hybrid tracker default for movie clips 2011-12-07 10:01:39 +00:00
f354d44cba Merging r42461 through r42481 from trunk into soc-2011-tomato 2011-12-07 09:24:45 +00:00
433033c2bf Camera tracking: some bug fixes
- Fixed bug with not putting disabled markers properly when doing backwards tracking
- Fixed margin size calculating from pattern size which used to be double-sized
  and prevented to track things on the image edges.
2011-12-07 09:21:50 +00:00
cbe9713b50 Object solver: minor tweaks
- Rename solving button to Object Motion if active tracking object isn't a camera
- Ignore refine flags when solving object
2011-12-05 19:31:21 +00:00
9355cc5c39 Object tracking; initial commit
This commit implements basis stuff needed for object tracking,
use case isn't perfect now, interface also should be cleaned a bit.

- Added list of objects to be tracked. Default there's only one object called
  "Camera" which is used for solving camera motion. Other objects can be added
  and each of them will have it;s own list of tracks. Only one object can be used
  for camera solving at this moment.
- Added new constraint called "Object Tracking" which makes oriented object be
  moving in the save way as solved object motion.
- Scene orientation tools can be used for orienting object to bundles.
- All tools which works with list of tracks or reconstruction data now
  gets that lists from active editing object.
- All objects and their tracking data are available via python api.
2011-12-05 18:57:17 +00:00
f55f9e95db Merging r42413 through r42441 form trunk into soc-2011-tomato 2011-12-05 18:53:09 +00:00
8582495c16 Minor whitespace fixes 2011-12-05 07:56:31 +00:00
756ac13e3a Merging r42394 through r42412 form trunk into soc-2011-tomato 2011-12-04 17:26:35 +00:00
af8587c6d6 Small code cleanup of tracking.c 2011-12-04 14:42:21 +00:00
f4b1c34ff0 Fix of pattern position clamping 2011-12-04 14:42:10 +00:00