HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
CL_GuidedTimeWarp.h
Go to the documentation of this file.
1
/*
2
* PROPRIETARY INFORMATION. This software is proprietary to
3
* Side Effects Software Inc., and is not to be reproduced,
4
* transmitted, or disclosed in any way without written permission.
5
*
6
* NAME: CL_GuidedTimeWarp.h ( Clip Library, C++)
7
*
8
* COMMENTS:
9
*
10
*/
11
12
#ifndef __CL_GuidedTimeWarp_h__
13
#define __CL_GuidedTimeWarp_h__
14
15
#include "
CL_API.h
"
16
#include <
UT/UT_String.h
>
17
#include <
UT/UT_UniquePtr.h
>
18
#include <
UT/UT_WorkBuffer.h
>
19
20
#include "
CL_TimeWarp.h
"
21
22
class
UT_OStream
;
23
class
CL_Clip
;
24
class
CL_Track
;
25
26
class
CL_API
CL_GuidedTimeWarp
:
public
CL_TimeWarp
27
{
28
public
:
29
30
CL_GuidedTimeWarp
();
31
~
CL_GuidedTimeWarp
()
override
;
32
33
void
warpClip(
fpreal
src_fps,
34
fpreal
ref_fps,
35
int
max_step,
36
int
warp_length,
37
int
knn,
38
fpreal
path_length_weight,
39
bool
use_warp_length,
40
UT_WorkBuffer
&error_msg);
41
42
private
:
43
44
void
computeMotionVector(
bool
get_src,
45
int
i,
int
j
,
int
k,
46
fpreal
*feature_vec);
47
void
computeRefMotionVectors();
48
49
void
initSmallestK(
fpreal
*smallest,
int
k);
50
void
updateSmallestK(
fpreal
*smallest,
int
k,
fpreal
candidate);
51
fpreal
averageSmallestK(
fpreal
*smallest,
int
k);
52
53
bool
computeWeightFn();
54
fpreal
computeRootWeight(
fpreal
*src_motion_vec,
int
f
,
int
j);
55
void
computeAverageWeight();
56
57
bool
computeShortestPaths();
58
void
findShortestPathLength(
fpreal
path_len_weight);
59
60
void
computeWarpMap();
61
62
fpreal
*getRefMotionVector(
int
f);
63
fpreal
&getWeightFn(
int
f0,
int
f1,
int
f2);
64
65
class
WarpPath
66
{
67
public
:
68
fpreal
weight;
69
int
prev;
70
};
71
WarpPath &getShortPath(
int
warped_frame,
int
f0,
int
f1)
72
{
73
int
index
= warped_frame*
myNumNodes
74
+ f0*myMaxStep
75
+ (f1-f0-1);
76
return
myShortPaths[
index
];
77
}
78
79
private
:
80
fpreal
myRefFPS;
81
fpreal
mySrcFPS;
82
83
fpreal64
myAverageWeight;
84
85
int
myMaxStep;
86
int
myKNearestNeighbours;
87
88
int
myNumNodes
;
89
int
myNumEdges;
90
UT_UniquePtr<fpreal[]>
myRefMotionVectors;
91
UT_UniquePtr<fpreal[]>
myWeightFn;
92
UT_UniquePtr<WarpPath[]>
myShortPaths;
93
};
94
95
#endif
CL_API.h
UT_WorkBuffer
Definition:
UT_WorkBuffer.h:74
CL_TimeWarp
Definition:
CL_TimeWarp.h:27
UT_UniquePtr
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
Definition:
UT_UniquePtr.h:39
fpreal64
double fpreal64
Definition:
SYS_Types.h:201
UT_String.h
CL_API
#define CL_API
Definition:
CL_API.h:10
arg_id_kind::index
f
GLfloat f
Definition:
glcorearb.h:1926
UT_WorkBuffer.h
myNumNodes
myNumNodes
Definition:
UT_RTreeImpl.h:707
CL_GuidedTimeWarp
Definition:
CL_GuidedTimeWarp.h:26
j
GLint j
Definition:
glad.h:2733
UT_UniquePtr.h
fpreal
fpreal64 fpreal
Definition:
SYS_Types.h:277
index
GLuint index
Definition:
glcorearb.h:786
CL_Track
Definition:
CL_Track.h:70
CL_TimeWarp.h
UT_OStream
Definition:
UT_OStream.h:35
CL_Clip
Definition:
CL_Clip.h:42
CL
CL_GuidedTimeWarp.h
Generated on Tue Dec 24 2024 02:40:17 for HDK by
1.8.6