Commit Graph

337 Commits

Author SHA1 Message Date
0ec75be1c6 Camera tracking: support refining radial K1, K2 only
This commits adds extra refirenment entry in the menu which is
"K1, K2" and which will apparently refine only this distortion
coefficients.

This would be useful in cases when you know for sure focal length
(which could be obtained from lens, EXIF and so) but not sure
about how good you manual calibration is.

Be careful tho, there're no internal constraints on this
coefficients so distortion model could just screw up into insane
values.
2013-02-26 11:46:38 +00:00
06264b63df Fix compilation error with libmv disabled 2013-02-25 13:15:42 +00:00
0479f785ca Camera tracking, minor changes:
- Fill in image dimension for camera intrinsics used for
  solution refirement.
- Retrieve K3 from camera intrinsics after refining.

Shall be no functional changes, just makes things clear
and robust for further improvements.
2013-02-25 09:46:47 +00:00
2df945d8ff Camera tracking: libmv distortion API now also uses camera intrinsics
structure instead of passing all the parameters to every function.

Makes it much easier to tweak distortion model.

---
svn merge -r52854:52855 ^/branches/soc-2011-tomato
2013-02-25 09:36:52 +00:00
12baa00b6a code cleanup: camera tracking
- Moved keyframes and refirement flags into reconstruction options structure
- Moved distortion coefficients and other camera intrinsics into own structure
- Cleaned up reconstruction functions in libmv c-api

---
svn merge -r52853:52854 ^/branches/soc-2011-tomato
2013-02-25 09:24:31 +00:00
ca689e88aa Motion tracking dopesheet
Highlight background depending on number of tracks existing on frame.

This is not so much mathematically accurate displaying where things
shall be improved, but it's nice feedback about which frames better
be reviewed.

Bad frames are tracks < 8, highlighted with red.
OK-ish frame  are 8 <= tracks < 16, highlighted with yellow.

Could be some artifacts with color region start/end, this is a bit
unclear what exactly expected to be highlighted -- frames are
displayed as dots, but in fact they're quite noticeable segments.

---
svn merge -r54572:54573 ^/branches/soc-2011-tomato
2013-02-22 10:13:15 +00:00
5cc377022b Correction to r54600
Calculate dependent area based on distortion model rather than
using 15% of image resolution for this.

Some assumptions here:

- We're assuming real-life camera calibration is used here
- Maximal undistortion delta would be achieved on frame boundary
- Distortion fully goes inside frame

This makes it possible to approximate margin for distortion by
checking undistortion delta across frame boundary and use it
for dependent area of interest.

We do not use any formula-based equation here because we're likely
support other distortion models and in that case it'll be stupid
to try detecting formula here.
2013-02-18 10:12:44 +00:00
48cfe610db Tracking settings for new clip didn't match default reset 2013-02-05 13:10:26 +00:00
c93e127e7a code cleanup: style and replace (float)sin, (float)cos with sinf, cosf 2013-01-12 14:28:23 +00:00
5943c81a93 code cleanup: neareast -> nearest 2012-12-11 14:19:41 +00:00
5137b5a146 Camera tracking: libmv distortion API now also uses camera intrinsics structure
instead of passing all the parameters to every function.

Makes it much easier to tweak distortion model.
2012-12-10 16:38:28 +00:00
ec870eb214 code cleanup: camera tracking
- Moved keyframes and refirement flags into reconstruction options structure
- Moved distortion coefficients and other camera intrinsics into own structure
- Cleaned up reconstruction functions in libmv c-api
2012-12-10 16:38:13 +00:00
b1afaa8312 Merging r51923 through r52851 from trunk into soc-2011-tomato 2012-12-10 15:18:00 +00:00
e2fe7751d6 code cleanup: replace most DO_MINMAX2 -> minmax_v2v2_v2
also add UNPACK macros's. handy for printing vectors for eg.
2012-11-15 22:20:18 +00:00
1c450d71ef Fixed crashes when motion tracks are zero-sized
This is probably versioning issue happened when both trunk and tomato
were mixed to work on the same file.

Anyway, there're few files here locally and it's probably other users
do have the same files, so lets keep things safe here :)
2012-11-07 11:18:42 +00:00
18326d852b Merging r50625 through r51896 from trunk into soc-2011-tomato
Merging just in case we'll want to develop some experimental stuff
2012-11-05 19:42:27 +00:00
3bd7816c75 Camera Tracking: allow fallback to reprojection resection by user demand
This fixes some "regressions" introduced in rev50781 which lead to much
worse solution in some cases. Now it's possible to bring old behavior back.

Perhaps it's more like temporal solution for time being smarter solution is
found. But finding such a solution isn't so fast, so let's bring manual
control over reprojection usage.

But anyway, imo it's now nice to have a structure which could be used to
pass different settings to the solver.
2012-11-05 08:04:27 +00:00
a31449edad all remove functions now invalidate the RNA objects passed, to help script authors to avoid bugs with accessing removed data. 2012-11-02 09:41:26 +00:00
c9dade4fe0 Big i18n commit: add "reports" from bmesh/readfile/tracking/dynapaint (and a few others), and another bunch of UI messages tweaks/fixes, as well as some BKE_report()<->BKE_reportf()... 2012-10-26 17:32:50 +00:00
9b110f2f64 Camera tracking fixes
- Dopesheet should be invalidated after solution
- Prevent crash when non-camera object is set as scene camera
2012-10-26 12:36:50 +00:00
fec81d9b56 use min_ max_ functions in more places.
also fix minor error in MOD decimate when the modifier did nothing the reported face count would be wrong.
2012-10-23 16:21:55 +00:00
f70d2c65d8 rename api functions...
- minf, maxf, mini, maxi --> min_ff, max_ff, min_ii, max_ii
2012-10-23 13:28:22 +00:00
c84802f51c Motion Tracking: fixed dopesheet left in incorrect state after joining tracks 2012-10-15 10:43:10 +00:00
abff7cac7e Color Management: remove unused function and get rid of unneeded float->byte conversion 2012-10-15 07:47:38 +00:00
33f35647e9 Motion Tracking: move keyframe settings to per-tracking object settings 2012-10-09 10:33:18 +00:00
589ada7f0c code cleanup: correct spelling 2012-09-28 06:45:20 +00:00
771c49b991 Fix #32669: Markers are not disabled properly if started from any other than first frame.
Was own mistake in code refactoring from a while ago.
2012-09-27 14:47:23 +00:00
5a3e474cc6 Tracking: fixed crash when reference frame fails to be loaded 2012-09-19 12:43:32 +00:00
dd62f5b7b8 Remove obsolete code from BKE_tracking_marker_clamp 2012-09-17 07:12:02 +00:00
d724d0adfe code cleanup: quiet warnings for gcc's -Wundef, -Wmissing-declarations 2012-09-16 00:26:36 +00:00
518c80fc94 remove unused parts of raskter module. 2012-09-15 23:05:34 +00:00
a73dd3476e Color Management, Stage 2: Switch color pipeline to use OpenColorIO
Replace old color pipeline which was supporting linear/sRGB color spaces
only with OpenColorIO-based pipeline.

This introduces two configurable color spaces:

- Input color space for images and movie clips. This space is used to convert
  images/movies from color space in which file is saved to Blender's linear
  space (for float images, byte images are not internally converted, only input
  space is stored for such images and used later).

  This setting could be found in image/clip data block settings.

- Display color space which defines space in which particular display is working.

  This settings could be found in scene's Color Management panel.

When render result is being displayed on the screen, apart from converting image
to display space, some additional conversions could happen.

This conversions are:

- View, which defines tone curve applying before display transformation.
  These are different ways to view the image on the same display device.
  For example it could be used to emulate film view on sRGB display.

- Exposure affects on image exposure before tone map is applied.

- Gamma is post-display gamma correction, could be used to match particular
  display gamma.

- RGB curves are user-defined curves which are applying before display
  transformation, could be used for different purposes.

All this settings by default are only applying on render result and does not
affect on other images. If some particular image needs to be affected by this
transformation, "View as Render" setting of image data block should be set to
truth. Movie clips are always affected by all display transformations.

This commit also introduces configurable color space in which sequencer is
working. This setting could be found in scene's Color Management panel and
it should be used if such stuff as grading needs to be done in color space
different from sRGB (i.e. when Film view on sRGB display is use, using VD16
space as sequencer's internal space would make grading working in space
which is close to the space using for display).

Some technical notes:

- Image buffer's float buffer is now always in linear space, even if it was
  created from 16bit byte images.

- Space of byte buffer is stored in image buffer's rect_colorspace property.

- Profile of image buffer was removed since it's not longer meaningful.

- OpenGL and GLSL is supposed to always work in sRGB space. It is possible
  to support other spaces, but it's quite large project which isn't so
  much important.

- Legacy Color Management option disabled is emulated by using None display.
  It could have some regressions, but there's no clear way to avoid them.

- If OpenColorIO is disabled on build time, it should make blender behaving
  in the same way as previous release with color management enabled.

More details could be found at this page (more details would be added soon):
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.64/Color_Management

--
Thanks to Xavier Thomas, Lukas Toene for initial work on OpenColorIO
integration and to Brecht van Lommel for some further development and code/
usecase review!
2012-09-15 10:05:07 +00:00
beba8014e4 Merging r50602 through r50617 form trunk into soc-2011-tomato 2012-09-15 06:24:48 +00:00
c73cd2fb6a Silent compiler's warnings about tracking module 2012-09-15 05:01:52 +00:00
be5a35d916 Color Management: get rid of image buffer's profile flag
Currently float buffers are always linear, space of byte buffer is defined by
rect_colorspace property.

Replaced logic of IMB_rect_from_float and IMB_float_from_rect to use this
assumptions (before it was special function used in some areas only, now it's
default behavior).

Almost all functions from ImBuf module which are actually used are got rid from
profile flag. Only remained issue is IMB_float_profile_ensure which only used by
CIneon/DPX exporter which is broken for a while already. Need to be fixed
separately.

This also fixed clone brush when cloning byte image on top of float, before
this result would be gamma-corrected twice.
2012-09-14 14:37:19 +00:00
e15f352831 Merging r50265 through r50373 from trunk into soc-2011-tomato 2012-09-04 09:06:37 +00:00
892cfa4285 fix [#32434] Copy-Paste Tracks causes Blender to freeze/crash on second use. 2012-09-03 01:05:04 +00:00
b96c622015 style cleanup 2012-08-11 22:12:32 +00:00
872ebc7310 fill in dummy values when using movie clip distort node but compiled without libmv. 2012-07-31 22:01:44 +00:00
c41e1e434a code cleanup: replace MIN2/MAX2 with minf/maxf 2012-07-29 16:59:51 +00:00
52aa7a4a4c Added utility function to return marker's subframe position
Used in mask parenting stuff.
2012-07-27 10:12:58 +00:00
4c2de5e0c7 fix some types and incorrect info 2012-07-26 17:41:09 +00:00
3a0593cc3d code cleanup: dont use function calls like dot_v3v3, pow and sqrt within macros which results in calling the function multiple times needlessly.
also added some comments.
2012-07-06 22:48:28 +00:00
468ef74ed7 More spell and typo fixes (mostly visualise->visualize, grey->gray, normalise->normalize). 2012-07-03 19:09:07 +00:00
1080c43d1c Camera solver: take track offset into account
This helps in cases when it's needed to track a feature which
goes out of screen for a while to prevent jump of camera.
2012-06-25 16:36:12 +00:00
226c86ae58 use an inline function for rgb -> bw conversion. 2012-06-22 07:49:44 +00:00
250e919b7c style cleanup 2012-06-16 09:18:00 +00:00
4b8c51d493 Remove unused code and correct comment for track mask AA
Tip: XXX should be used for such kind of crap which is bad for release
     disabled AA for mask is not such a case.
2012-06-15 16:07:23 +00:00
4f80c3464f fix for building without libmv 2012-06-15 14:40:01 +00:00
8da0a03774 2D stabilization didn't work since clip start frame commit 2012-06-15 11:15:48 +00:00