Commit Graph

38 Commits

Author SHA1 Message Date
Brenno
3f11361f09 Added support to attach a clip to another clip 2021-01-27 17:41:39 -03:00
Brenno
a5feadce1e Changed KeyframeBBox to TrackedObjectBBox and added TrackedObjectBase
Added new base class TrackedObjectBase, changed class KeyframeBBox to TrackedObjectBBox and changes it's inheritance from KeyframeBase to TrackedObjectBase.
2021-01-18 14:52:01 -03:00
Brenno
3d5d907c5d Updated Clip.cpp to support GUI to select attached object
Modified Clip.cpp PropertiesJSON function and applied minor fixes to Keyframe_Tests
2021-01-14 15:45:28 -03:00
Brenno
61accdfe95 Merge branch 'opencv' into keyframe-refactor 2021-01-14 15:00:04 -03:00
FeRD (Frank Dana)
ed77db81d2 Unit tests: Don't use OpenShot.h header
- To prevent slow compiles of unit tests, replace all of the
  '#include "OpenShot.h"' invocations with includes of the
  individual headers actually needed by each test file.

Revert "Unit tests: Don't use OpenShot.h header"

This reverts commit e5cc4f8bf91fc60697996023a86dc618637f6161.

Unit tests: Don't use OpenShot.h header

- To prevent slow compiles of unit tests, replace all of the
  '#include "OpenShot.h"' invocations with includes of the
  individual headers actually needed by each test file.
2020-12-26 06:15:53 -05:00
Brenno
b579ea6499 Added functionality to link a clip to a tracked object (Animations)
- Added KeyframeBase class
- Adjusted the inheritance of KeyframeBase to KeyframeBBox and Keyframe
- Added feature to attach clip to bounding box
- Added support to select tracked object with a dropdown list and removed keyframebbox downcasting
2020-12-22 21:32:36 -03:00
Brenno
4fdd325ea3 Added rotation transform to the tracker bounding-box.
Changed the bounding-box struct point convention to (cx, cy, width, height, angle).
The GetFrame member function from Tracker class now uses the cv::RotatedRect object to represent the bounding-box and draw it on screen.
The JSON and Protobuf communication between the backend and frontend still uses the (x1,y1)(x2,y2) point convention, the backend performs the adequate transformations.
2020-12-14 18:08:44 -03:00
Brenno
60cec478d3 Refactored KeyframeBBox
-Moved the methods that handles protobuf data from Tracker to KeyframeBBox
-Displacement and scale keyframes are now properties of KeyframeBBox
-Changed interface that updates the KeyframeBBox properties.
2020-12-12 20:23:34 -03:00
Brenno
dd9e203695 Added transform handler for Tracker effect
It's now possible to adjust the tracked bounding box from the preview window. Some work is needed to make it generic to the ObjectDetection effect and future effects
2020-11-28 18:09:10 -03:00
Brenno
9113153be8 Added properties to Tracker effects
(still needs some fine-tuning)
2020-11-12 21:35:47 -03:00
Brenno
34aabcc6e2 Removed Excess information from json. 2020-11-12 21:30:11 -03:00
Brenno
1215d042c7 Added scale factor to class to replace OpFPS. 2020-11-12 21:25:27 -03:00
Brenno
5db1c0f453 Initial design of new keyframes specialized classes
The keyframe collections would better integrate with effects that uses bounding boxes, skeletons and facial points.
2020-10-29 00:34:31 -03:00
FeRD (Frank Dana)
fcebbead83 tests: Update include paths 2020-10-18 07:47:36 -04:00
Daniel Jour
89479bb01a Keyframe tests: Add test about large segment, including performance
This new test makes sure that a large segment is handled correctly and
also with reasonable performance.  The timeout of 10ms is still
relatively slow (on a mid-class laptop it takes 0.001ms currently) but
the test shouldn't fail when e.g. the build machine is under (mild to
heavy) load.
2019-12-06 01:35:31 +01:00
Daniel Jour
504fd0e3fa KeyFrame_Tests.cpp: Correct usage for CHECK_EQUAL
It's CHECK_EQUAL(expected, actual), not the other way around!
2019-11-24 21:12:33 +01:00
Daniel Jour
86c1df211a Update Keyframe test curve values; new curves are smoother
The curves generated by the new code are much smoother than the old
curves and align much better with what (at least gnuplot) says are the
"correct curves".  Some values therefore needed updating.
2019-11-24 21:00:37 +01:00
Daniel Jour
bd82403969 KeyFrame_Tests: Additional tests to correctly capture old behaviour 2019-11-22 22:34:22 +01:00
Daniel Jour
504ea0c1ff Make Keyframe::Values and Keyframe::Points vectors private
The Values vector should only be accessed from the outside through the
GetValue() function.  The Points vector should only be accessed using
the AddPoint(), RemovePoint(), .. functions.

This helps maintain internal invariants (e.g. keeping Points sorted)
and allows for future removal / lazy evaluation of Values.

The size() of the vectors had been accessed from various parts of the
code; the GetLength() (for Values) and GetCount() (for Points) member
functions provide access to this information and are already part of
the public API.
2019-11-19 23:43:28 +01:00
FeRD (Frank Dana)
b6da6b9659 add DONT_SET_USING_JUCE_NAMESPACE to tests 2019-10-27 03:54:36 -04:00
FeRD (Frank Dana)
f170fdd009 Update copyright range to current year 2019-06-11 06:48:32 -04:00
FeRD (Frank Dana)
0327c2ab5c Remove license block from documentation comment 2019-06-09 08:31:04 -04:00
Jonathan Thomas
8f385c112a Improved Keyframe Performance (#197)
* Refactor of Coorindate and Keyframe optimized for performance (much faster than previously). Also refactored FrameMapper to not use a Keyframe, and to only process frame mapping when needed... speeding up Json loading of project files.

* Fixing FrameMapper linear calculation to match existing Keyframe calculation

* Fixing Keyframe to pass original unit tests, and correctly calculate the Keyframe repeat fractions and deltas.

* Small refactor of time mapped logic in Clip.cpp
2019-03-06 15:35:03 -06:00
Jonathan Thomas
559d6a0545 Huge refactor of keyframe point handles (bezier quadratic curves) to use CSS-style syntax. Basically, the left and right handles of a point now use percentages, such as 0.0, 1.0, 0.5, 1.0 (between 0 and 1), and become real coordinates based on the value differences between points (in real time). Also simplified the JSON property creation. Also, many unit tests have been updated, because they were actually generating the incorrect values from before... although only slightly in most cases. Now they have correct values from the default bezier handles. 2016-10-19 02:19:07 -05:00
Jonathan Thomas
1743558f99 Improved image caching logic, to better estimate max image sizes possible, based on clip scale and keyframe settings... so we are always dealing with the smallest possible frame sizes for performance (without losing quality) 2016-09-17 17:14:27 -05:00