|
a |
|
b/Tests/Cameras.any |
|
|
1 |
|
|
|
2 |
AnyOperationSequence RunTest = { |
|
|
3 |
AnyOperation& LoadTimeImage = Main.LoadTimeCam.Preview; |
|
|
4 |
AnyOperation& initpos = Main.CameraInitPos; |
|
|
5 |
AnyOperation& InitPosImage = Main.InitPosCam.Preview; |
|
|
6 |
|
|
|
7 |
}; |
|
|
8 |
|
|
|
9 |
#ifdef TEST_NAME |
|
|
10 |
AnyString CameraName = TEST_NAME; |
|
|
11 |
#define _OPEN_PREVIEW OFF |
|
|
12 |
#else |
|
|
13 |
AnyString CameraName = ANYBODY_NAME_MAINFILE; |
|
|
14 |
#define _OPEN_PREVIEW ON |
|
|
15 |
#endif |
|
|
16 |
|
|
|
17 |
#ifndef _MODEL_UP_DIRECTION |
|
|
18 |
#define _MODEL_UP_DIRECTION y |
|
|
19 |
#endif |
|
|
20 |
|
|
|
21 |
|
|
|
22 |
|
|
|
23 |
VideoLookAtCamera LoadTimeCam(_AUTO_OPEN_PREVIEW_=_OPEN_PREVIEW, UP_DIRECTION=_MODEL_UP_DIRECTION, TRANSPARENT_BACKGROUND = 1) = |
|
|
24 |
{ |
|
|
25 |
VideoInputScale = 1; |
|
|
26 |
VideoResolution = {500,500}; |
|
|
27 |
BackgroundColor = DesignVar({1,1,1}); |
|
|
28 |
//CameraUpDirection = Main.CameraUpDirection; |
|
|
29 |
Preview.FileName = Main.CameraName + "_LoadTime.png"; |
|
|
30 |
#ifdef CREATE_IMAGE_FULLDIR |
|
|
31 |
VideoOutputPath = CREATE_IMAGE_FULLDIR; |
|
|
32 |
#else |
|
|
33 |
VideoOutputPath = ANYBODY_PATH_OUTPUT; |
|
|
34 |
#endif |
|
|
35 |
Camera.Recorder.AntiAlias = 4; |
|
|
36 |
}; |
|
|
37 |
|
|
|
38 |
|
|
|
39 |
|
|
|
40 |
VideoLookAtCamera InitPosCam(_AUTO_OPEN_PREVIEW_=_OPEN_PREVIEW, UP_DIRECTION=_MODEL_UP_DIRECTION, TRANSPARENT_BACKGROUND = 1) = |
|
|
41 |
{ |
|
|
42 |
VideoInputScale = 1; |
|
|
43 |
VideoResolution = {500,500}; |
|
|
44 |
CameraLookAtPoint = Main.LoadTimeCam.CameraLookAtPoint; |
|
|
45 |
CameraFieldOfView = Main.LoadTimeCam.CameraFieldOfView; |
|
|
46 |
CameraDirection = Main.LoadTimeCam.CameraDirection; |
|
|
47 |
CameraUpDirection = Main.LoadTimeCam.CameraUpDirection; |
|
|
48 |
BackgroundColor = DesignVar({1,1,1}); |
|
|
49 |
Preview.FileName = Main.CameraName + "_InitPos.png"; |
|
|
50 |
#ifdef CREATE_IMAGE_FULLDIR |
|
|
51 |
VideoOutputPath = CREATE_IMAGE_FULLDIR; |
|
|
52 |
#else |
|
|
53 |
VideoOutputPath = ANYBODY_PATH_OUTPUT; |
|
|
54 |
#endif |
|
|
55 |
Camera.Recorder.AntiAlias = 4; |
|
|
56 |
|
|
|
57 |
}; |
|
|
58 |
|
|
|
59 |
|
|
|
60 |
#ifdef CREATE_VIDEO |
|
|
61 |
RunTest = |
|
|
62 |
{ |
|
|
63 |
AnyOperation& InitPosImage = Main.VideoCam.Create_Video; |
|
|
64 |
}; |
|
|
65 |
VideoLookAtCamera VideoCam(_AUTO_PLAY_VIDEOS=_OPEN_PREVIEW) = |
|
|
66 |
{ |
|
|
67 |
VideoName = Main.CameraName; |
|
|
68 |
Analysis = { |
|
|
69 |
AnyOperation &ref = Main.RunApplication; |
|
|
70 |
}; |
|
|
71 |
VideoInputScale = 5; |
|
|
72 |
VideoResolution = {350,350}; |
|
|
73 |
CameraUpDirection = Main.LoadTimeCam.CameraUpDirection; |
|
|
74 |
// VideoInputFrameRate = 30; |
|
|
75 |
VideoOutputFrameRate = 30; |
|
|
76 |
CameraLookAtPoint = Main.InitPosCam.CameraLookAtPoint; |
|
|
77 |
CameraFieldOfView = Main.InitPosCam.CameraFieldOfView; |
|
|
78 |
CameraDirection = Main.InitPosCam.CameraDirection; |
|
|
79 |
BackgroundColor = DesignVar({1,1,1}); |
|
|
80 |
//Counter = Main.study.iStep; |
|
|
81 |
#ifdef CREATE_IMAGE_FULLDIR |
|
|
82 |
VideoOutputPath = CREATE_IMAGE_FULLDIR; |
|
|
83 |
#else |
|
|
84 |
VideoOutputPath = ANYBODY_PATH_OUTPUT; |
|
|
85 |
#endif |
|
|
86 |
Camera.Recorder.AntiAlias = 0; |
|
|
87 |
|
|
|
88 |
}; |
|
|
89 |
#endif |
|
|
90 |
|