65 lines (45 with data), 2.1 kB
// See following file for more information on the camera class template
// and options.
// #include "<ANYBODY_PATH_MODELUTILS>/Video/VideoLookAtCamera.any"
#include "<ANYBODY_PATH_MODELUTILS>/Video/VideoLookAtCamera.any"
#define VIDEO_STUDY Main.Studies.InverseDynamicStudy
#define VIDEO_ANALYSIS InverseDynamics
VIDEO_STUDY = {
VideoLookAtCamera VideoTool (UP_DIRECTION = z) =
{
VideoName = Main.ModelSetup.TrialSpecificData.TrialFileName;
// The resolution and aspect ratio of the video
VideoResolution = {720, 1080};
// Create frames in twice the video size and scale down when video
// is created. This gives much better videos. Especially with lower resolutions
VideoInputScale = 2;
// The point the camera focus on COM
CameraLookAtPoint = {0.5, 0.75, 1} ;
// The vertical field of view in meters at the LookAtPoint
CameraFieldOfView = 1.9;
// The direction which the camera is placed
// (In global coordinates with respect to the LookAtPoint)
CameraDirection = {0, -1, 0.2};
// Counter used for nameing the indivual frames.
Counter = VIDEO_STUDY.iStep;
/// Determines the speed of the video.
/// Currently set to realtime
VideoInputFrameRate = round(VIDEO_STUDY.nStep/iffun(VIDEO_STUDY.tEnd-VIDEO_STUDY.tStart, VIDEO_STUDY.tEnd-VIDEO_STUDY.tStart, 1.0*VIDEO_STUDY.nStep));
// Operation which run before recoding is started.
PreAnalysis = {
AnyOperation &step1 = Main.RunAnalysis.LoadParameters;
AnyOperation &step2 = Main.RunAnalysis.MarkerTracking;
};
// The operations which should be included in the video.
Analysis = {
AnyOperation &ref = VIDEO_STUDY.VIDEO_ANALYSIS;
};
Create_Video.Settings.DisplayPriority = PriorityLow;
};
};
Main.ModelSetup = {
AnyOperationSequence CreateVideo = {
Settings.DisplayPriority = PriorityHigh;
AnyOperation& CreateVideo = VIDEO_STUDY.VideoTool.Create_Video;
};
};