|
a |
|
b/Application/Examples/BenchPress/Model/CreateVideo.any |
|
|
1 |
|
|
|
2 |
// See following file for more information on the camera class template and options. |
|
|
3 |
// #include "<ANYBODY_PATH_MODELUTILS>/Video/VideoLookAtCamera.any" |
|
|
4 |
|
|
|
5 |
// This is a simple example of using the camera class to create videos. |
|
|
6 |
|
|
|
7 |
// NOTE: Set "_DEBUG=1" if anything goes wrong. This will allow you to see |
|
|
8 |
// what fails. |
|
|
9 |
#include "<ANYBODY_PATH_MODELUTILS>/Video/VideoLookAtCamera.any" |
|
|
10 |
|
|
|
11 |
#define VIDEO_STUDY Main.Study |
|
|
12 |
#define VIDEO_ANALYSIS InverseDynamics |
|
|
13 |
|
|
|
14 |
VIDEO_STUDY = { |
|
|
15 |
VideoLookAtCamera VideoTool (UP_DIRECTION = y) = |
|
|
16 |
{ |
|
|
17 |
// Change this to give the created video a different filename. |
|
|
18 |
VideoName = ANYBODY_NAME_MAINFILEDIR; |
|
|
19 |
|
|
|
20 |
// The resolution and aspect ratio of the video |
|
|
21 |
VideoResolution = {1920, 1080}; |
|
|
22 |
|
|
|
23 |
// Create frames in twice the video size and scale down when video |
|
|
24 |
// is created. This gives much better videos. Especially with lower resolutions |
|
|
25 |
VideoInputScale = 2; |
|
|
26 |
|
|
|
27 |
// The point the camera focuses on |
|
|
28 |
CameraLookAtPoint = Main.Model.EnvironmentModel.GlobalRef.Origin; |
|
|
29 |
|
|
|
30 |
// The vertical field of view in meters at the 'CameraLookAtPoint' |
|
|
31 |
CameraFieldOfView = 1.7; |
|
|
32 |
|
|
|
33 |
// The direction which the camera is placed |
|
|
34 |
// (In global coordinates with respect to the CameraLookAtPoint) |
|
|
35 |
CameraDirection = {1, 0.3, 1}; |
|
|
36 |
|
|
|
37 |
// Counter used for nameing the indivual frames. |
|
|
38 |
Counter = VIDEO_STUDY.iStep; |
|
|
39 |
|
|
|
40 |
// Determines the speed of the video. |
|
|
41 |
// Currently set to realtime |
|
|
42 |
VideoInputFrameRate = round(VIDEO_STUDY.nStep/(VIDEO_STUDY.tEnd-VIDEO_STUDY.tStart)); |
|
|
43 |
|
|
|
44 |
|
|
|
45 |
// Operation which run before recoding is started. |
|
|
46 |
PreAnalysis = { |
|
|
47 |
AnyOperation &step1 = Main.RunApplication.CalibrationAnal; |
|
|
48 |
}; |
|
|
49 |
|
|
|
50 |
// The operations which should be included in the video. |
|
|
51 |
Analysis = { |
|
|
52 |
AnyOperation &ref = VIDEO_STUDY.VIDEO_ANALYSIS; |
|
|
53 |
}; |
|
|
54 |
}; |
|
|
55 |
|
|
|
56 |
}; |
|
|
57 |
|
|
|
58 |
|
|
|
59 |
|
|
|
60 |
|
|
|
61 |
|